From e1bc951b7f9afe015de035be47b8ca3cb5559e89 Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst Date: Sun, 30 Dec 2001 23:14:31 +0000 Subject: [PATCH] fgetc() returns an int which should never ever be put in a char. --- ChangeLog.claws | 16 ++++++++++++++++ configure.in | 2 +- src/ldif.c | 2 +- src/mutt.c | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 58a93e0e6..2ac03b563 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,19 @@ +2001-12-31 [alfons] 0.6.6claws34 + + * src/ldif.c + * src/mutt.c + fgetc() returns a signed integer which doesn't + fit in a char. so c truncates this to a char + but we may lose significant bits. i.e. we may + comparing 0xFF which may not be equal to -1 + unless properly casted to signed char which + we won't do because fgetc() returns a signed + integer which doesn't fit in a char. so c + truncates this to a char but we may lose + significat bits. (you got the idea, thanks + to Gustavo Noronha Silva + and the Debian folks!) + 2001-12-30 [alfons] 0.6.6claws33 * src/prefs_common.c diff --git a/configure.in b/configure.in index 1710550a4..5f20766c1 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=6 MICRO_VERSION=6 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws33 +EXTRA_VERSION=claws34 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl diff --git a/src/ldif.c b/src/ldif.c index e2fb8fcb7..9818503c3 100644 --- a/src/ldif.c +++ b/src/ldif.c @@ -226,7 +226,7 @@ static void ldif_close_file( LdifFile *ldifFile ) { */ static gchar *ldif_get_line( LdifFile *ldifFile ) { gchar buf[ LDIFBUFSIZE ]; - gchar ch; + int ch; gchar *ptr; if( feof( ldifFile->file ) ) return NULL; diff --git a/src/mutt.c b/src/mutt.c index c8f443b71..d547c0759 100644 --- a/src/mutt.c +++ b/src/mutt.c @@ -142,7 +142,7 @@ static void mutt_close_file( MuttFile *muttFile ) { */ static gchar *mutt_get_line( MuttFile *muttFile, gboolean *flagCont ) { gchar buf[ MUTTBUFSIZE ]; - gchar ch, lch; + int ch, lch; gchar *ptr, *lptr; *flagCont = FALSE; -- 2.25.1