[FFmpeg-devel] [PATCH]RTSP Basic Authentication
Ronald S. Bultje
rsbultje
Sat Feb 28 18:50:31 CET 2009
Hi,
On Sat, Feb 28, 2009 at 12:38 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
> Ronald S. Bultje wrote:
>> Secondly, the auth takes 256 bytes, although it will almost always be
>> absent, and the 256 might then be too small depending on password. For
>> completeness, could you please dynamically allocate the auth string in
>> RTSPState (size = ceil(strlen(auth)*6/8.)+1 or something)?
>
> Does it do that in the http equivalent? (if isn't could be useful fix it
> as well)
Uh, my above is wrong, should be *8/6., not the other way around.
http.c does *4/3+12. I don't know why it does +12. The documentation
of _encode() is in line with what I wrote above (except that it
doesn't use ceil() but some simpler integer-only equivalent). Probably
a bug in http.c. Attached patch fixes this.
Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-http-auth-len.patch
Type: application/octet-stream
Size: 477 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090228/7d545aa1/attachment.obj>
More information about the ffmpeg-devel
mailing list