[Win32utils-devel] [ win32utils-Bugs-8039 ] Cannot send data that includes a binary 0

noreply at rubyforge.org noreply at rubyforge.org
Sun Jan 21 03:51:23 EST 2007


Bugs item #8039, was opened at 2007-01-21 01:51
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=8039&group_id=85

Category: win32-pipe
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: David Koontz (dkoontz)
Assigned to: Nobody (None)
Summary: Cannot send data that includes a binary 0

Initial Comment:
In pipe.c on lines 262 and 278, the size of the buffer to be written to the named pipe is calculated using strlen(ptr->chBuf).  If you want to send data such as [0].pack("I") the strlen will report a size of zero.  Instead I believe calling the Ruby string's size/length method would give a correct value.  I have verified that this can work by using the Win32API lib to wrap the appropriate Win32 calls and passing in my packed data with the string.size as the buffer size.

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=8039&group_id=85


More information about the win32utils-devel mailing list