Update of /cvsroot/linux-decnet/dnprogs/librms
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18611
Modified Files:
readwrite.cc
Log Message:
Fix a "d'oh" moment where were we returned an error if the buffer was
big enough, and data if it was too small ;-)
Index: readwrite.cc
===================================================================
RCS file: /cvsroot/linux-decnet/dnprogs/librms/readwrite.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** readwrite.cc 16 Oct 2005 09:05:25 -0000 1.8
--- readwrite.cc 26 Feb 2008 14:20:57 -0000 1.9
***************
*** 62,66 ****
if (rc->record)
{
! if (maxlen <= rc->dlen)
{
memcpy(buf, rc->record, rc->dlen);
--- 62,66 ----
if (rc->record)
{
! if (maxlen >= rc->dlen)
{
memcpy(buf, rc->record, rc->dlen);
|