Article View: comp.bugs.sys5
Article #57Streams adjmsg bug
From: Linwood Varney
Date: Wed, 09 Aug 1989 06:23
Date: Wed, 09 Aug 1989 06:23
23 lines
1110 bytes
1110 bytes
The streams function adjmsg() will fail in certain cases if trimming
bytes from the end of a message. If adjmsg() is passed a message that
contains more than one message block, or more specifically if the last
message block is larger than the number of bytes you wish to trim off.
The while statement in the function adjmsg():
bp = mp;
while (len && bp) {
bp = mp;
fails the second time through since bp is also used within an inner loop.
If the while statement is changed to:
/* bp = mp; (statement no longer needed */
while (len) {
bp = mp;
the function works as documented.
- Linwood Varney linwood@ingr.com
Network Communications Intergraph Corp.
Technical Details
Message-ID:
<5650@b11.ingr.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watmath!att!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!ingr!b11!linwoodShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watmath!att!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!ingr!b11!linwood From: linwood@b11.ingr.com (Linwood Varney) Newsgroups: comp.bugs.sys5 Subject: Streams adjmsg bug Keywords: streams adjmsg Message-ID: <5650@b11.ingr.com> Date: 9 Aug 89 06:23:09 GMT Reply-To: linwood@b11.UUCP (Linwood Varney) Organization: Intergraph Corp. Huntsville, AL Lines: 23