[PATCH] sh: pread/pwrite doesn't handle negative offset correctly

Carmelo AMOROSO carmelo.amoroso at st.com
Thu Apr 26 08:22:10 UTC 2007


Hi All,
running LTP test suite on uClibc-nptl for sh4 I found a bug into pread 
and pwrite
functions.
When the offset is negative it is not correctly handled due to a missing 
shift operation,
so it is passed to the syscall as the highest unsigned positive value.
Same bug occurs into trunk.
Attached patch fixes the trunk code (libc/sysdeps/linux/sh/pread_write.c)

Regards,
Carmelo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pread_write_sh.patch
Url: http://lists.busybox.net/pipermail/uclibc/attachments/20070426/fbb6ca84/attachment-0001.diff 


More information about the uClibc mailing list