RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Aug-2013 21:14:42 Branch: rpm-5_4 Handle: 2013080419144100 Modified files: (Branch: rpm-5_4) rpm/rpmio rpmpigz.c Log: - coverity #1060692 Summary: Revision Changes Path 1.68.6.4 +3 -2 rpm/rpmio/rpmpigz.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/rpmpigz.c ============================================================================ $ cvs diff -u -r1.68.6.3 -r1.68.6.4 rpmpigz.c --- rpm/rpmio/rpmpigz.c 4 Aug 2013 19:11:40 -0000 1.68.6.3 +++ rpm/rpmio/rpmpigz.c 4 Aug 2013 19:14:41 -0000 1.68.6.4 @@ -1956,7 +1956,7 @@ size_t max; /* maximum name length for current verbosity */ size_t n; /* name length without suffix */ time_t now; /* for getting current year */ - char mod[26]; /* modification time in text */ + char mod[64+1]; /* modification time in text */ char name[NAMEMAX1+1]; /* header or file name, possibly truncated */ if (_debug) @@ -1978,7 +1978,8 @@ /* convert time stamp to text */ if (zh->stamp) { - strcpy(mod, ctime(&zh->stamp)); + strncpy(mod, ctime(&zh->stamp), sizeof(mod)); + mod[sizepf(mod)-1] = '\0'; now = time(NULL); /*@-aliasunique@*/ if (strcmp(mod + 20, ctime(&now) + 20) != 0) @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org