[PATCH] v4l-utils: bugfix memory chunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>From a5cfa1881de152a887d195e8c880dcca3e6b766e Mon Sep 17 00:00:00 2001
From: Stefan Ringel <linuxtv@xxxxxxxxxxxxxxx>
Date: Tue, 4 Mar 2014 20:50:32 +0100
Subject: [PATCH] v4l-utils: bugfix memory chunk

Bug 1070855 - [abrt] v4l-utils: parse_string(): dvbv5-scan killed by SIGABRT
https://bugzilla.redhat.com/show_bug.cgi?id=1070855

Signed-off-by: Stefan Ringel <linuxtv@xxxxxxxxxxxxxxx>
---
 lib/libdvbv5/descriptors/desc_frequency_list.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libdvbv5/descriptors/desc_frequency_list.c b/lib/libdvbv5/descriptors/desc_frequency_list.c
index de6f9fd..0a06a4a 100644
--- a/lib/libdvbv5/descriptors/desc_frequency_list.c
+++ b/lib/libdvbv5/descriptors/desc_frequency_list.c
@@ -36,10 +36,10 @@ void dvb_desc_frequency_list_init(struct dvb_v5_fe_parms *parms, const uint8_t *
 
 	d->frequencies = (d->length - len) / sizeof(d->frequency[0]);
 
-	d->frequency = calloc(1, sizeof(d->frequency));
+	d->frequency = calloc(d->frequencies, sizeof(d->frequency));
 
 	for (i = 0; i < d->frequencies; i++) {
-		d->frequency[i] = ((uint32_t *) buf)[i];
+		d->frequency[i] = ((uint32_t *) p)[i];
 		bswap32(d->frequency[i]);
 		switch (d->freq_type) {
 			case 1: /* satellite - to get kHz */
-- 
1.9.0


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux