Summary: | ASTERISK-10528: [path] main/util.c missed *dst='\0'; in ast_base64decode() | ||
Reporter: | Yuri (ys) | Labels: | |
Date Opened: | 2007-10-15 06:14:31 | Date Closed: | 2009-08-25 18:55:24 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) util.c.diff | |
Description: | I fount, that ast_base64decode() don't return NULL terminated string. This can produce surprising result in returned string.. | ||
Comments: | By: Yuri (ys) 2007-10-15 06:23:21 This is also true for trunk. By: Digium Subversion (svnbot) 2007-10-15 07:27:30 Repository: asterisk Revision: 85543 U branches/1.4/main/utils.c ------------------------------------------------------------------------ r85543 | russell | 2007-10-15 07:27:28 -0500 (Mon, 15 Oct 2007) | 8 lines Make sure that the base64 decoder returns a terminated string. (closes issue ASTERISK-10528) Reported by: ys Patches: util.c.diff uploaded by ys (license 281) - small mods by me ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-10-15 07:28:48 Repository: asterisk Revision: 85544 _U trunk/ U trunk/main/utils.c ------------------------------------------------------------------------ r85544 | russell | 2007-10-15 07:28:48 -0500 (Mon, 15 Oct 2007) | 16 lines Merged revisions 85543 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85543 | russell | 2007-10-15 07:48:10 -0500 (Mon, 15 Oct 2007) | 8 lines Make sure that the base64 decoder returns a terminated string. (closes issue ASTERISK-10528) Reported by: ys Patches: util.c.diff uploaded by ys (license 281) - small mods by me ........ ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-10-17 23:20:08 Repository: asterisk Revision: 86237 U branches/1.4/main/utils.c ------------------------------------------------------------------------ r86237 | russell | 2007-10-17 23:20:06 -0500 (Wed, 17 Oct 2007) | 9 lines Revert a change that I made for issue ASTERISK-10528 which, as has been pointed out to me in issue ASTERISK-10563, doesn't really make sense. There is no reason to have the base64 decode function force a NULL terminated buffer, when the result is almost always binary, anyway. In fact, this caused some breakage, as some code in res_crypto passed in a buffer exactly the right size to get its binary result, which got stomped on by this patch. (closes issue ASTERISK-10563, reported by dimas) ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-10-17 23:20:46 Repository: asterisk Revision: 86238 _U trunk/ U trunk/main/utils.c ------------------------------------------------------------------------ r86238 | russell | 2007-10-17 23:20:46 -0500 (Wed, 17 Oct 2007) | 17 lines Merged revisions 86237 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86237 | russell | 2007-10-17 23:40:52 -0500 (Wed, 17 Oct 2007) | 9 lines Revert a change that I made for issue ASTERISK-10528 which, as has been pointed out to me in issue ASTERISK-10563, doesn't really make sense. There is no reason to have the base64 decode function force a NULL terminated buffer, when the result is almost always binary, anyway. In fact, this caused some breakage, as some code in res_crypto passed in a buffer exactly the right size to get its binary result, which got stomped on by this patch. (closes issue ASTERISK-10563, reported by dimas) ........ ------------------------------------------------------------------------ |