[aravis] gv_device: don't NULL terminate the raw genicam data.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gv_device: don't NULL terminate the raw genicam data.
- Date: Thu, 28 Jun 2012 15:24:58 +0000 (UTC)
commit e8a7d03a9001dcca60e477fe08a3773bcb2b300d
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Thu Jun 28 17:23:08 2012 +0200
gv_device: don't NULL terminate the raw genicam data.
First of all, it was wrong for zipped data, as I guess there is no
reason the zipped data should be NULL terminated. And even for xml
text, as we have the data size, we will not use strlen on it.
src/arvgvdevice.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/arvgvdevice.c b/src/arvgvdevice.c
index db0d24d..410ffc4 100644
--- a/src/arvgvdevice.c
+++ b/src/arvgvdevice.c
@@ -528,8 +528,6 @@ _load_genicam (ArvGvDevice *gv_device, guint32 address, size_t *size)
genicam = g_malloc (file_size);
if (arv_device_read_memory (ARV_DEVICE (gv_device), file_address, file_size,
genicam, NULL)) {
- genicam [file_size - 1] = '\0';
-
if (g_str_has_suffix (tokens[2], ".zip")) {
ArvZip *zip;
const GSList *zip_files;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]