Bugs item #1608461, was opened at 2006-12-04 13:42
Message generated for change (Comment added) made by subrata_modak
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=103382&aid=1608461&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: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Nicolas Dade (ndade)
Assigned to: mreed (mreed10)
Summary: pipe10 calls strcmp() on unterminated string

Initial Comment:
ltp/testcases/kernel/syscalls/pipe/pipe10.c writes a string to the child. The 
length written is strlen(wrbuf), thus it does not include the terminating '\0'. 
The child read(2)s this into rebuf, and then calls strcmp(rebuf, wrbuf). Since 
rebuf is not properly terminated strcmp() can fail.

It looks like someone tried to fix this by adding a '\0' at the end of the 
string used to initialize wrbuf, but since the length sent is determined by 
strlen(3) that makes no difference.

A simple fix is to include the '\0' in the data written to the child. Patch 
below.


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

>Comment By: Subrata (subrata_modak)
Date: 2007-04-13 11:14

Message:
Logged In: YES 
user_id=1737361
Originator: NO

Patch Applied and Bug closed.

Thanks--
Subrata

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

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ltp-list mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to