Patches item #1749645, was opened at 2007-07-07 17:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=303382&aid=1749645&group_id=3382

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: Testcases
Group: System Calls
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Helge Deller (hdeller)
Assigned to: Nobody/Anonymous (nobody)
Summary: lseek09 uses unitialized variable

Initial Comment:
The testcase lseek09 reads 4 bytes out of a file into a char array, which 
hasn't been initialized before. The problem is, that the read() syscall only 
reads the given number of characters (4) but does not add a trailing zero (\0) 
character. Since the array wasn't zero-initialized before, the 5th character is 
undefined and (at least on the hppa/parisc architecture) non-zero.
The testcase compares then the read-in string (4 chars + some undefined 
characters) to the fixed string "defg" with strcmp() and strcmp() fails since 
the 5th caracter is non-zero.

Simple one-liner patch attached.

Helge

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=303382&aid=1749645&group_id=3382

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to