Browse Source

Make av_base64_encode() do not require the user to provide an

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
tags/v0.5
Stefano Sabatini 16 years ago
parent
commit
0d20c3fdad
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/base64.c

+ 1
- 1
libavutil/base64.c View File

@@ -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) {


Loading…
Cancel
Save