Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
931ead58
Commit
931ead58
authored
Aug 22, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight polish
parent
4c814318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
hex.c
lib/libvmod_blob/hex.c
+4
-10
No files found.
lib/libvmod_blob/hex.c
View file @
931ead58
...
...
@@ -109,7 +109,7 @@ hex_decode(const enum encoding dec, char *restrict const buf,
char
*
dest
=
buf
;
const
char
*
b
;
unsigned
char
extranib
=
0
;
s
s
ize_t
len
=
0
;
size_t
len
=
0
;
AN
(
buf
);
AN
(
strings
);
...
...
@@ -123,25 +123,19 @@ hex_decode(const enum encoding dec, char *restrict const buf,
b
=
s
;
while
(
*
s
)
{
if
(
!
isxdigit
(
*
s
++
))
{
len
=
-
1
;
break
;
errno
=
EINVAL
;
return
(
-
1
)
;
}
}
if
(
len
==
-
1
)
break
;
len
+=
s
-
b
;
}
if
(
len
==
0
)
return
0
;
if
(
len
==
-
1
)
{
errno
=
EINVAL
;
return
-
1
;
}
if
(
n
!=
-
1
&&
len
>
n
)
len
=
n
;
if
((
len
+
1
)
>>
1
>
buflen
)
{
if
((
(
len
+
1
)
>>
1
)
>
buflen
)
{
errno
=
ENOMEM
;
return
-
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment