[PATCH] cygutils:conv.c: Prevent truncation of file if 0xFF is encountered

Pavel Tsekov ptsekov@gmx.net
Mon Apr 15 13:30:00 GMT 2002


Hello ;)

Today a colleague of mine was struck by a bug of dos2unix/unix2dos
utilities i.e. if the code encounters 0xFF in the file being processed
it erronously thinks that this is the EOF and stops processing. The
result is that the original file is truncated to the position of the
0xFF character.

As to why we have such characters in source file - our mother language
is bulgarian and we sometimes still type comments in it :)

A patch is attached to fix this behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conv.c.diff
Type: application/octet-stream
Size: 1357 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020415/74e1364d/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list