aboutsummaryrefslogtreecommitdiffstats
path: root/sounds
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 21:32:18 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 21:32:18 +0000
commitf972dc2553f93524fc37597377093f9354dace78 (patch)
tree234dacaf235eba0db357217b0f985073564f50ba /sounds
parent9b8f05521b0c6bae6dfc9e1df70d81e3561d9832 (diff)
Merged revisions 247335 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r247335 | mmichelson | 2010-02-17 15:22:40 -0600 (Wed, 17 Feb 2010) | 20 lines Fix two problems in ast_str functions found while writing a unit test. 1. The documentation for ast_str_set and ast_str_append state that the max_len parameter may be -1 in order to limit the size of the ast_str to its current allocated size. The problem was that the max_len parameter in all cases was a size_t, which is unsigned. Thus a -1 was interpreted as UINT_MAX instead of -1. Changing the max_len parameter to be ssize_t fixed this issue. 2. Once issue 1 was fixed, there was an off-by-one error in the case where we attempted to write a string larger than the current allotted size to a string when -1 was passed as the max_len parameter. When trying to write more than the allotted size, the ast_str's __AST_STR_USED was set to 1 higher than it should have been. Thanks to Tilghman for quickly spotting the offending line of code. Oh, and the unit test that I referenced in the top line of this commit will be added to reviewboard shortly. Sit tight... ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@247337 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'sounds')
0 files changed, 0 insertions, 0 deletions