From 46375ad6e0b74fbb6d785872e28804d92decc8c1 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 19 Jan 2009 13:21:08 -0500 Subject: fix a buffer overflow bug that cause http://code.google.com/p/opkg/issues/detail?id=3 git-svn-id: http://opkg.googlecode.com/svn/trunk@197 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg_cmd.c') diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c index 043536c..f0ac3f7 100644 --- a/libopkg/opkg_cmd.c +++ b/libopkg/opkg_cmd.c @@ -815,7 +815,7 @@ static int opkg_info_status_cmd(opkg_conf_t *conf, int argc, char **argv, int in char *pkg_name = NULL; char **pkg_fields = NULL; int n_fields = 0; - char *buff ; + char *buff = NULL; if (argc > 0) { pkg_name = argv[0]; @@ -847,6 +847,7 @@ static int opkg_info_status_cmd(opkg_conf_t *conf, int argc, char **argv, int in We need to free it :) ( Thanks florian for seeing the error ) */ free(buff); + buff = NULL; } if (conf->verbosity > 1) { conffile_list_elt_t *iter; -- cgit v0.9.1