Fixed nasty segmentation fault bug on membuffer.c.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@142 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
c3060e0d0b
commit
88076a3c4b
@ -1,3 +1,11 @@
|
|||||||
|
*************************************************************************
|
||||||
|
Version 1.4.3
|
||||||
|
*************************************************************************
|
||||||
|
|
||||||
|
2007-03-03 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
|
||||||
|
* Fixed nasty segmentation fault bug on membuffer.c.
|
||||||
|
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
Version 1.4.2
|
Version 1.4.2
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -331,9 +331,10 @@ membuffer_assign( INOUT membuffer * m,
|
|||||||
return return_code;
|
return return_code;
|
||||||
}
|
}
|
||||||
// copy
|
// copy
|
||||||
|
if( buf_len ) {
|
||||||
memcpy( m->buf, buf, buf_len );
|
memcpy( m->buf, buf, buf_len );
|
||||||
m->buf[buf_len] = 0; // null-terminate
|
m->buf[buf_len] = 0; // null-terminate
|
||||||
|
}
|
||||||
m->length = buf_len;
|
m->length = buf_len;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user