git.samba.org
/
lorikeet-heimdal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ae941a
)
rk_base64_encode(): set errno in all error cases
author
Nicolas Williams
<nico@twosigma.com>
Mon, 12 Aug 2019 22:55:40 +0000
(17:55 -0500)
committer
Nicolas Williams
<nico@twosigma.com>
Thu, 3 Oct 2019 18:09:18 +0000
(13:09 -0500)
lib/roken/base64.c
patch
|
blob
|
history
diff --git
a/lib/roken/base64.c
b/lib/roken/base64.c
index 6ee4899e53312f281d2c91e1b861d3fd9f49630f..93eac061eefe524e6a4161456239b1ac864b4a56 100644
(file)
--- a/
lib/roken/base64.c
+++ b/
lib/roken/base64.c
@@
-33,6
+33,7
@@
#include <config.h>
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
@@
-61,6
+62,7
@@
rk_base64_encode(const void *data, int size, char **str)
if (size > INT_MAX/4 || size < 0) {
*str = NULL;
+ errno = ERANGE;
return -1;
}