summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_cmd.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-01-19 13:21:08 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-01-19 13:21:08 (EST)
commit46375ad6e0b74fbb6d785872e28804d92decc8c1 (patch)
tree381f0369137039a4d7550099736e6cd773a55281 /libopkg/opkg_cmd.c
parent6b3819c6d9b86832b41f6caa865596f6fb204c8e (diff)
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
Diffstat (limited to 'libopkg/opkg_cmd.c')
-rw-r--r--libopkg/opkg_cmd.c3
1 files changed, 2 insertions, 1 deletions
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;