noreply at rubyforge.org
2007-Jan-21 08:51 UTC
[Win32utils-devel] [ win32utils-Bugs-8039 ] Cannot send data that includes a binary 0
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
noreply at rubyforge.org
2007-Jan-24 02:07 UTC
[Win32utils-devel] [ win32utils-Bugs-8039 ] Cannot send data that includes a binary 0
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: Daniel Berger (djberg96)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. ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2007-01-23 19:07 Message: That sounds like a plan. This package needs to be refactored in general, so I''ll add that to the list. Thanks, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=8039&group_id=85
Maybe Matching Threads
- [ win32utils-Bugs-8942 ] several typo in windows-pr.
- [ win32utils-Bugs-5479 ] Incorrect SetLastError declarations
- [ win32utils-Bugs-14298 ] windows-api 0.2.0/windows-pr 0.7.1 causes segfault with require of win32/file
- [ win32utils-Bugs-12979 ] Error while trying to update my gem collection
- [ win32utils-Bugs-4101 ] create hash param