Bug 1208

Summary: Core dump when the release version contains bad characters
Product: [Retired] Red Hat Raw Hide Reporter: accot
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 1.0CC: accot
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-02-16 22:23:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description accot 1999-02-16 18:10:05 UTC
When the version number contains a '-' (that was the case of
ftp.freshmeat.net/pub/freshmeat/rpms/x11amp/x11amp-0.9-alpha3-1.src.rpm)
rpm wants to print an error message, but dumps core.

That was with rpm-2.91-5 but it's the same with rpm-2.91-8

--
(gdb) r -bb /usr/src/redhat/SPECS/x11amp.spec
Starting program: /bin/rpm -bb
/usr/src/redhat/SPECS/x11amp.spec

Program received signal SIGSEGV, Segmentation fault.
0x8096ad0 in _IO_vfprintf (s=0xbfff8df8, format=0x80dd7a0
"line %d: Illegal char '-' in %s: %s", ap=0xbfff8ec4) at
vfprintf.c:1230
1230    vfprintf.c: Aucun fichier ou ripertoire de ce type.
(gdb) where
#0  0x8096ad0 in _IO_vfprintf (s=0xbfff8df8,
format=0x80dd7a0 "line %d: Illegal char '-' in %s: %s",
ap=0xbfff8ec4) at vfprintf.c:1230
#1  0x809ccc5 in _IO_vsprintf (string=0x8103724 "line
135124932: Illegal char '-' in ", format=0x80dd7a0 "line %d:
Illegal char '-' in %s: %s", args=0xbfff8ebc)
    at iovsprintf.c:47
#2  0x8072714 in rpmError ()
#3  0x805d3b7 in handlePreambleTag ()
#4  0x805df2a in parsePreamble ()
#5  0x80599a2 in parseSpec ()
#6  0x8048839 in buildForTarget ()
#7  0x80488e2 in build ()
#8  0x8051bf1 in main ()
#9  0x80904cd in __libc_start_main (main=0x804f480 <main>,
argc=3, argv=0xbffff1e4, init=0x80480b4 <_init>,
fini=0x80d6e8c <_fini>, rtld_fini=0, stack_end=0xbffff1dc)
    at ../sysdeps/generic/libc-start.c:78

Comment 1 Jeff Johnson 1999-02-16 22:23:59 UTC
Fixed in both production and development branches in rpm CVS tree --
two arguments were reversed in the error message.