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
3ffc27d5
Commit
3ffc27d5
authored
Aug 22, 2018
by
Poul-Henning Kamp
Committed by
Dridi Boukelmoune
Oct 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight polish
Conflicts: lib/libvmod_blob/hex.c
parent
a6ab945e
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 @
3ffc27d5
...
...
@@ -108,7 +108,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
;
va_list
ap2
;
AN
(
buf
);
...
...
@@ -122,26 +122,20 @@ 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
;
}
va_end
(
ap2
);
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