http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56844



Andrew Pinski <pinskia at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |RESOLVED

         Resolution|                            |INVALID



--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-04 
16:38:41 UTC ---

>( str[i] != '\0' ) && ( i < 16 )



You access str[16] which is undefined behavior.  Switch around the check for i

and str[i] will work correctly.



That is:

  for( i = 0;  ( i < 16 ) && ( str[i] != '\0' ); i++ );

Reply via email to