Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2789/client_libs/libplayerc
Modified Files:
dev_camera.c
Log Message:
applied patches 1825568 and 1826743 fixing some issues with recent updates.
Index: dev_camera.c
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/dev_camera.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** dev_camera.c 1 Nov 2007 22:16:16 -0000 1.17
--- dev_camera.c 8 Nov 2007 04:23:26 -0000 1.18
***************
*** 51,55 ****
#endif
- #include <assert.h>
#include <math.h>
#include <stdlib.h>
--- 51,54 ----
***************
*** 118,123 ****
device->image = realloc(device->image,
sizeof(device->image[0])*device->image_count);
! assert(device->image_count <= sizeof(device->image));
! memcpy(device->image, data->image, device->image_count);
}
else
--- 117,124 ----
device->image = realloc(device->image,
sizeof(device->image[0])*device->image_count);
! if (device->image)
! memcpy(device->image, data->image, device->image_count);
! else
! PLAYERC_ERR1("failed to allocate memory for image, needed %ld bytes\n",
sizeof(device->image[0])*device->image_count);
}
else
***************
*** 148,153 ****
device->image_count = dst_size;
device->image = realloc(device->image,
sizeof(device->image[0])*device->image_count);
! assert(dst_size <= sizeof device->image);
! memcpy(device->image, dst, dst_size);
free(dst);
--- 149,156 ----
device->image_count = dst_size;
device->image = realloc(device->image,
sizeof(device->image[0])*device->image_count);
! if (device->image)
! memcpy(device->image, dst, dst_size);
! else
! PLAYERC_ERR1("failed to allocate memory for image, needed %ld bytes\n",
sizeof(device->image[0])*device->image_count);
free(dst);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit