OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd02ea1
)
Make av_base64_encode() do not require the user to provide an
author
Stefano Sabatini
<stefano.sabatini-lala@poste.it>
Sun, 8 Feb 2009 21:00:39 +0000
(21:00 +0000)
committer
Stefano Sabatini
<stefano.sabatini-lala@poste.it>
Sun, 8 Feb 2009 21:00:39 +0000
(21:00 +0000)
overallocated buffer where to put the encoded string.
See the thread:
"[PATCH] Improve documentation for libavutil/base64.h".
Originally committed as revision 17065 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/base64.c
patch
|
blob
|
history
diff --git
a/libavutil/base64.c
b/libavutil/base64.c
index
2c980cf
..
8497a67
100644
(file)
--- a/
libavutil/base64.c
+++ b/
libavutil/base64.c
@@
-79,7
+79,7
@@
char *av_base64_encode(char * buf, int buf_len, const uint8_t * src, int len)
int bytes_remaining = len;
if (len >= UINT_MAX / 4 ||
- buf_len <
len * 4 / 3 + 12
)
+ buf_len <
(len+2) / 3 * 4 + 1
)
return NULL;
ret = dst = buf;
while (bytes_remaining) {