From: ewt Date: Mon, 19 Feb 1996 16:29:15 +0000 (+0000) Subject: shouldn't write to strings that are initialized X-Git-Tag: tznext/4.11.0.1.tizen20130304~11638 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b581648217713662c57b565f390805c4557fe30e;p=tools%2Flibrpm-tizen.git shouldn't write to strings that are initialized CVS patchset: 322 CVS date: 1996/02/19 16:29:15 --- diff --git a/query.c b/query.c index c964b6d..6b4a817 100644 --- a/query.c +++ b/query.c @@ -186,7 +186,7 @@ static void printFileInfo(char * name, unsigned int size, unsigned short mode, unsigned int mtime, unsigned short rdev, char * owner, char * group, int uid, int gid, char * linkto) { - char * perms = "----------"; + char perms[11]; char sizefield[15]; char ownerfield[9], groupfield[9]; char timefield[100] = ""; @@ -196,6 +196,8 @@ static void printFileInfo(char * name, unsigned int size, unsigned short mode, static int thisMonth = 0; struct tm * tstruct; char * namefield = name; + + strcpy(perms, "----------"); if (!thisYear) { currenttime = time(NULL);