Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29036 - Infinite loop while reading option file in app-crypt/gpa version 0.6.1
Summary: Infinite loop while reading option file in app-crypt/gpa version 0.6.1
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robert Coie (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-18 01:07 UTC by Olivier Castan
Modified: 2005-07-21 15:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Castan 2003-09-18 01:07:09 UTC
First use of gpa seems to run ok, but it doesn't start the second time.
According to strace, the program does not seem to be able to detect the end of
~/.gnupg/gpa.conf. Using gdb I found the function read_next_word in options.c
was never returning because (c = getc (file)) can't be EOF since c is a char (at
least on my system)...

Reproducible: Always
Steps to Reproduce:
1. emerge gpa
2. gpa
3. gpa

Actual Results:  
Hanging without displaying anything the second time

Expected Results:  
start...

Patch (bug report filled at bugs.gnupg.org) :

--- gpa-0.6.1/src/options.c     2003-01-15 01:16:23.000000000 +0100
+++ gpa-0.6.1.new/src/options.c 2003-09-17 18:54:39.000000000 +0200
@@ -342,7 +342,7 @@
 read_next_word (FILE *file, char *buffer, int size)
 {
   int i = 0;
-  char c;
+  int c;
  
   buffer[0] = '\0';
   /* Skip leading whitespace */
@@ -358,7 +358,7 @@
       /* Read the word */
       while ((c = getc (file)) != EOF && !isspace (c) && i < (size-1))
         {
-          buffer[i++] = c;
+          buffer[i++] = (char) c;
         }
       buffer[i] = '\0';
        

emerge info :

Portage 2.0.49-r4 (default-ppc-1.4, gcc-3.2.3, glibc-2.2.5-r4,2.3.2-r1,
2.4.21-ppc-r2)
=================================================================
System uname: 2.4.21-ppc-r2 ppc
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe -mcpu=750"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -pipe -mcpu=750"
DISTDIR="/home/portage/distfiles"
FEATURES="ccache"
GENTOO_MIRRORS="http://194.83.57.11/sites/www.ibiblio.org/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://194.83.57.7/sites/www.ibiblio.org/gentoo/
http://194.83.57.2/sites/www.ibiblio.org/gentoo/
http://194.83.57.3/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/home/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="oss xv jpeg nls mitshm gif png truetype ppc foomaticdb gnome-libs gdbm
berkdb slang readline bonobo tcltk guile X sdl gpm tcpd pam libwww perl python
esd imlib gnome gtk motif opengl mozilla alsa cups gd spell pdflib java xface
crypt -kde avi mpeg quicktime flash gtkhtml -qt dvd oggvorbis ssl -mysql fbcon
ggi ppds mad tiff ldap"
Comment 1 Philipp Kern 2004-04-03 02:30:27 UTC
I cannot confirm this bug.
gpa runs fine even when called twice.

This bug is so old, somebody should really look at it.
Comment 3 Olivier Castan 2005-01-10 04:50:35 UTC
Should be closed, gpa-0.6.1 is no more in portage tree
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-07-21 15:33:39 UTC
Closing an obsolete bug.