RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 18-Oct-2010 13:33:01 Branch: HEAD Handle: 2010101811330000 Modified files: rpm/build parsePrep.c Log: check return value of rindex() before using strcasecmp() Summary: Revision Changes Path 2.132 +2 -2 rpm/build/parsePrep.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/build/parsePrep.c ============================================================================ $ cvs diff -u -r2.131 -r2.132 parsePrep.c --- rpm/build/parsePrep.c 18 Oct 2010 11:27:12 -0000 2.131 +++ rpm/build/parsePrep.c 18 Oct 2010 11:33:00 -0000 2.132 @@ -237,7 +237,7 @@ } t = rindex(sp->source, '.'); - if(!strcasecmp(t, ".gem")) + if(t && !strcasecmp(t, ".gem")) rubygem = 1; t = stpcpy(taropts, "-x"); @@ -495,7 +495,7 @@ } if (sp != NULL) { char *t = rindex(sp->source, '.'); - if(!strcasecmp(t, ".gem")) + if(t && !strcasecmp(t, ".gem")) createDir = 1; } } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org