Bugs item #3596296, was opened at 2012-12-15 09:03 Message generated for change (Comment added) made by uklauer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3596296&group_id=10706
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: nu774 (nu774) Assigned to: Nobody/Anonymous (nobody) Summary: lsx_parsesamples() bug Initial Comment: author Ulrich Klauer <ulr...@chirlu.de> Sun, 14 Oct 2012 19:34:14 +0000 (21:34 +0200) committer Ulrich Klauer <ulr...@chirlu.de> Sun, 14 Oct 2012 19:34:14 +0000 (21:34 +0200) By the above commit, time format parsing fails for valid time spec due to the following bug. + if (strchr("+-", *str)) + combine = *str++; + else combine = '\0'; This code is *meant* to check if *str is '+' or '-'. However, when str points to the nul terminater here, strchr() doesn't return NULL and str is wrongly incremented beyond nul terminater (please consult spec of strchr(s,c), It works like that when c == 0). ---------------------------------------------------------------------- >Comment By: Ulrich Klauer (uklauer) Date: 2012-12-15 13:52 Message: Thank you for pointing this out. lsx_parsesamples even failed the tests now, so either I didn't re-test after some changes, or there happened to be some zero-padding after the test strings. Added a test case (string containing an explicit NUL) to always catch this in the future. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3596296&group_id=10706 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel