artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c760f44
)
Limit length on URIs
author
job
<job@openbsd.org>
Wed, 27 Oct 2021 18:09:08 +0000
(18:09 +0000)
committer
job
<job@openbsd.org>
Wed, 27 Oct 2021 18:09:08 +0000
(18:09 +0000)
OK beck@
usr.sbin/rpki-client/validate.c
patch
|
blob
|
history
diff --git
a/usr.sbin/rpki-client/validate.c
b/usr.sbin/rpki-client/validate.c
index
f511edc
..
8380d8c
100644
(file)
--- a/
usr.sbin/rpki-client/validate.c
+++ b/
usr.sbin/rpki-client/validate.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: validate.c,v 1.1
7 2021/10/24 12:06:16
job Exp $ */
+/* $OpenBSD: validate.c,v 1.1
8 2021/10/27 18:09:08
job Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@
-321,6
+321,9
@@
valid_uri(const char *uri, size_t usz, const char *proto)
{
size_t s;
+ if (usz > 2048)
+ return 0;
+
for (s = 0; s < usz; s++)
if (!isalnum((unsigned char)uri[s]) &&
!ispunct((unsigned char)uri[s]))