Hello community,
here is the log from the commit of package tkrat for openSUSE:Factory checked in at 2011-12-25 17:42:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tkrat (Old)
and /work/SRC/openSUSE:Factory/.tkrat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tkrat", Maintainer is "max@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/tkrat/tkrat.changes 2011-09-23 12:48:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tkrat.new/tkrat.changes 2011-12-25 17:42:33.000000000 +0100
@@ -1,0 +2,12 @@
+Wed Dec 21 11:42:12 UTC 2011 - max@suse.com
+
+- Use the latest CVS snapshot from 2010-07-21.
+- Apply the last fix to blt_busy.so as well.
+- %{?_smp_mflags} breaks build, so don't use it.
+
+-------------------------------------------------------------------
+Fri Oct 7 14:34:16 UTC 2011 - max@suse.com
+
+- Fix build with newer Tcl that doesn't use RTLD_GLOBAL anymore.
+
+-------------------------------------------------------------------
Old:
----
tkrat-2.2-20071230.tar.bz2
New:
----
tkrat-2.2-20100721.tar.bz2
tkrat-load.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tkrat.spec ++++++
--- /var/tmp/diff_new_pack.0z9vkB/_old 2011-12-25 17:42:34.000000000 +0100
+++ /var/tmp/diff_new_pack.0z9vkB/_new 2011-12-25 17:42:34.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package tkrat (Version 2.2)
+# spec file for package tkrat
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,21 +15,24 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: tkrat
Url: http://www.tkrat.org
-BuildRequires: openssl-devel pam-devel tk-devel xorg-x11-devel
-License: BSD 3-Clause
+BuildRequires: openssl-devel
+BuildRequires: pam-devel
+BuildRequires: tk-devel
+BuildRequires: xorg-x11-devel
+License: BSD-3-Clause
Group: Productivity/Networking/Email/Clients
AutoReqProv: on
Version: 2.2
Release: 50
Summary: A very mighty, graphical emailclient
-Source0: tkrat-2.2-20071230.tar.bz2
+Source0: tkrat-2.2-20100721.tar.bz2
Patch0: tkrat.patch
Patch1: tkrat-warnings.patch
+Patch2: tkrat-load.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -39,35 +42,28 @@
MIME-encoded e-mail, has a nice mail monitor, can sync e-mail for
offline work, and has many other nice features.
-
-
-Authors:
---------
- maf@dtek.chalmers.se
-
%prep
%setup -q -n %name
%patch0
%patch1
+%patch2 -p 1
%build
export CFLAGS="%optflags -fno-strict-aliasing"
export CC=gcc
-./configure \
+%configure \
--prefix=%_prefix \
--libdir=%tcl_archdir \
--datadir=%tcl_noarchdir \
--with-tkconfig=%_libdir \
--mandir=%_mandir
-make CC=gcc
+# tkrat's build system doesn not support make -j
+make
%install
rm -rf %buildroot
make install INSTALL_PREFIX=%buildroot
-%clean
-rm -rf %buildroot
-
%files
%defattr(-,root,root)
%_prefix/bin/tkrat
++++++ tkrat-2.2-20071230.tar.bz2 -> tkrat-2.2-20100721.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/configure new/tkrat/configure
--- old/tkrat/configure 2007-04-16 06:55:38.000000000 +0200
+++ new/tkrat/configure 2009-06-28 21:48:39.000000000 +0200
@@ -3128,7 +3128,49 @@
{ (exit 1); exit 1; }; }
fi
else
- # Extract the first word of "tclsh8.5", so it can be a program name with args.
+ # Extract the first word of "tclsh8.6", so it can be a program name with args.
+set dummy tclsh8.6; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_tclsh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $tclsh in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_tclsh="$tclsh" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_tclsh="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+tclsh=$ac_cv_path_tclsh
+if test -n "$tclsh"; then
+ { echo "$as_me:$LINENO: result: $tclsh" >&5
+echo "${ECHO_T}$tclsh" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ tv=8.6
+ if test "x$tclsh" = "x"; then
+ # Extract the first word of "tclsh8.5", so it can be a program name with args.
set dummy tclsh8.5; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
@@ -3168,7 +3210,8 @@
fi
- tv=8.5
+ tv=8.5
+ fi
if test "x$tclsh" = "x"; then
# Extract the first word of "tclsh8.4", so it can be a program name with args.
set dummy tclsh8.4; ac_word=$2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/configure.in new/tkrat/configure.in
--- old/tkrat/configure.in 2007-04-16 06:55:38.000000000 +0200
+++ new/tkrat/configure.in 2009-06-28 21:48:39.000000000 +0200
@@ -113,8 +113,12 @@
AC_MSG_ERROR('Can not find tcl/tk $required_tcl_version in path')
fi
else
- AC_PATH_PROG(tclsh, tclsh8.5, , $PATH)
- tv=8.5
+ AC_PATH_PROG(tclsh, tclsh8.6, , $PATH)
+ tv=8.6
+ if test "x$tclsh" = "x"; then
+ AC_PATH_PROG(tclsh, tclsh8.5, , $PATH)
+ tv=8.5
+ fi
if test "x$tclsh" = "x"; then
AC_PATH_PROG(tclsh, tclsh8.4, , $PATH)
tv=8.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/Makefile new/tkrat/doc/Makefile
--- old/tkrat/doc/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/tkrat/doc/Makefile 2011-12-21 13:30:41.000000000 +0100
@@ -0,0 +1,37 @@
+#############################################################################
+# TkRat software and its included text is Copyright 1996-2004 by #
+# Martin Forssen. #
+# #
+# The full text of the legal notices is contained in the file called #
+# COPYRIGHT, included with this distribution. #
+#############################################################################
+
+# Installation directories
+ datarootdir = ${prefix}/share
+ prefix = /usr/local
+ exec_prefix = ${prefix}
+ MAN_DIR = ${datarootdir}/man
+ BIN_DIR = ${exec_prefix}/bin
+ DATA_DIR = ${datarootdir}/`echo tkrat${VERSION} | sed '${TRANSFORM}'`
+ LIB_DIR = ${exec_prefix}/lib64/`echo tkrat${VERSION} | sed '${TRANSFORM}'`
+
+ INSTALL = /usr/bin/install -c
+INSTALL_PREFIX =
+
+#-------- No changes should be done below --------
+TARGETS = tkrat.1
+
+all: ${TARGETS}
+
+install.shared: ${TARGETS}
+ if test ! -d ${INSTALL_PREFIX}${MAN_DIR} ; then \
+ ${INSTALL} -m 0755 -d ${INSTALL_PREFIX}${MAN_DIR} ;\
+ fi
+ if test ! -d ${INSTALL_PREFIX}${MAN_DIR}/man1 ; then \
+ ${INSTALL} -m 0755 -d ${INSTALL_PREFIX}${MAN_DIR}/man1 ;\
+ fi
+ ${INSTALL} -m 0644 tkrat.1 ${INSTALL_PREFIX}${MAN_DIR}/man1/tkrat.1
+
+install: install.shared
+
+clean:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/Makefile.in new/tkrat/doc/Makefile.in
--- old/tkrat/doc/Makefile.in 2004-07-09 19:43:51.000000000 +0200
+++ new/tkrat/doc/Makefile.in 2009-06-28 21:49:19.000000000 +0200
@@ -7,6 +7,7 @@
#############################################################################
# Installation directories
+ datarootdir = @datarootdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
MAN_DIR = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/changes new/tkrat/doc/changes
--- old/tkrat/doc/changes 2007-12-30 15:48:14.000000000 +0100
+++ new/tkrat/doc/changes 2010-07-08 21:09:54.000000000 +0200
@@ -1,6 +1,15 @@
This file lists the changes made to TkRat between versions. It is much
more detailed than the changes shown to the user when starting a new version.
+100708: (bug fix) Fixed sending on some linuxes
+
+100105: (bug fix) Fixed various issues with how bad passphrases where
+ handled when signing or decrypting messages.
+
+100105: (bug fix) Fixed bug in advanced pop mode of first use wizard.
+
+090630: (bug fix) Fixed a number of compilation warnings.
+
071230: (bug fix) Handle new configure events generated by tcl/tk 8.5.
070917: (bug fix) Do not dump core if getpwuid() fails.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/features new/tkrat/doc/features
--- old/tkrat/doc/features 2005-02-23 07:11:53.000000000 +0100
+++ new/tkrat/doc/features 2009-06-28 21:49:51.000000000 +0200
@@ -1,23 +1,20 @@
CURRENT
+gmail
+ imap.gmail.com
BUGS
-#What happens when one mistypes the pgp passphrase: later
+Move two (flagged) messages from spam to inbox causes it to download all messages again
MUST
TODO
-+ Make spell-check and sorting be set globally...
-Upfdate to latest c-client
-Look through preferences (weed)
-Autocomplete addresses
-Remember dir between sessions...
+Color icon?
-Setting for date format in msglist
+Hotkeys for moving email to folders
+Create groups on dates
+Search LDAP when entering address
+New imap toolkit
Better keydef window
-Concatenate flag updates when uploading local to disconnected.
-Add support for tnef helper program
-Look at combobox
-Go through dialogs and make escape be cancel
Dialogs, Status, Reason, Action (Verb)
Fix bcc problem when doing pgp
Icons in vfolderdef window (instead of Monitored,INBOX et al)
@@ -28,7 +25,6 @@
More detailed date info specifier
Create generic paning-widget
Performance
-Support pictures as attachments to html
Userproc for alias expansion (gives list of possible expansions)
Alias-expansion should expand on given part of address...
Keyboard shortcut to show body
@@ -38,20 +34,14 @@
Button to close alias window?
Go offline when all connections fails
Rename RatAddressSize to RatAddressMaxSize (and change implementation)
-Reply should include fullname in adresses
Move more stuff to preferences window (everything which uses rat_list)
-Mailto hyperlinks according to rfc2817
-Generate Message-Id
Escape '^From ' in attachments and text
Ignore trailing dot in urls
Do not always update the master folder when running in online-mode?
Include From in reply-to all
Implement save to dynamic folder
Use mime.types-file and possibly other file command
-Convert hold and sent to real (openable) folders
Reimplement PGP (sign & encrypt immediately)
-Folder list window
-Group operations (forward, bounce)
Partial quotations
Network sync command which includes ';'
Import & generate vcard
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/Makefile.in new/tkrat/lib/Makefile.in
--- old/tkrat/lib/Makefile.in 2006-01-16 16:46:16.000000000 +0100
+++ new/tkrat/lib/Makefile.in 2009-06-28 21:49:19.000000000 +0200
@@ -20,6 +20,7 @@
EXTRA_CFLAGS = @CFLAGS@ @MEM_DEBUG_FLAGS@
# Installation directories
+ datarootdir = @datarootdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
MAN_DIR = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratAppInit.c new/tkrat/lib/ratAppInit.c
--- old/tkrat/lib/ratAppInit.c 2007-09-17 16:07:43.000000000 +0200
+++ new/tkrat/lib/ratAppInit.c 2009-06-30 22:13:29.000000000 +0200
@@ -895,11 +895,11 @@
{
char buf[1024];
const char *tmp = Tcl_GetVar(timerInterp, "rat_tmp", TCL_GLOBAL_ONLY);
- int fd;
+ int fd, l;
snprintf(buf, sizeof(buf), "%s/mark", tmp);
if (0 <= (fd = open(buf, O_RDWR|O_TRUNC|O_CREAT, 0644))) {
- write(fd, "mark", 4);
+ l = safe_write(fd, "mark", 4); /* Ignore result */
lseek(fd, 0, SEEK_SET);
SafeRead(fd, buf, 4);
close(fd);
@@ -1412,7 +1412,7 @@
long
RatDelaySoutr(void *stream_x, char *string)
{
- int len1, len2;
+ int len1, len2, l;
len1 = strlen(ratDelayBuffer);
len2 = strlen(string);
@@ -1420,8 +1420,8 @@
strlcat(ratDelayBuffer, string, sizeof(ratDelayBuffer));
return 1;
}
- write((int)stream_x, ratDelayBuffer, len1);
- write((int)stream_x, string, len2-2);
+ l = safe_write((int)stream_x, ratDelayBuffer, len1); /* Ignore result */
+ l = safe_write((int)stream_x, string, len2-2); /* Ignore result */
ratDelayBuffer[0] = string[len2-2];
ratDelayBuffer[1] = string[len2-1];
return 1;
@@ -2425,7 +2425,9 @@
*size = used;
} else {
buf = (char*)ckalloc(sbuf.st_size+1);
- fread(buf, sbuf.st_size, 1, fp);
+ if (1 != fread(buf, sbuf.st_size, 1, fp)) {
+ sbuf.st_size = 0;
+ }
buf[sbuf.st_size] = '\0';
*size = sbuf.st_size;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratDbase.c new/tkrat/lib/ratDbase.c
--- old/tkrat/lib/ratDbase.c 2007-08-16 06:45:30.000000000 +0200
+++ new/tkrat/lib/ratDbase.c 2010-01-05 21:52:39.000000000 +0100
@@ -408,7 +408,9 @@
}
}
} while (-1 == fhLock);
- write(fhLock, ident, strlen(ident));
+ if (-1 == safe_write(fhLock, ident, strlen(ident))) {
+ fprintf(stderr, "Failed to write dbase lock\n");
+ }
close(fhLock);
if (msgPost) {
RatLog(interp, RAT_INFO, "", RATLOG_TIME);
@@ -610,7 +612,9 @@
*/
size = sbuf.st_size - cmdArg;
indexBuf = (char*)ckalloc(size + 1);
- fread(indexBuf, size, 1, fpIndex);
+ if (!fread(indexBuf, size, 1, fpIndex)) {
+ size = 0;
+ }
fclose(fpIndex);
indexBuf[size] = '\0';
indexOffset = cmdArg;
@@ -1055,7 +1059,7 @@
losing:
(void)snprintf(buf, sizeof(buf), "%s/index", dbDir);
- (void)truncate(buf, indexPos);
+ i = truncate(buf, indexPos); /* Ignore result */
Unlock(interp);
return TCL_ERROR;
@@ -1637,9 +1641,12 @@
return NULL;
}
Unlock(interp);
- fgets(header, sizeof(header)-1, messFp);
+ if (fgets(header, sizeof(header)-1, messFp)) {
+ header[sizeof(header)-1] = '\0';
+ } else {
+ header[0] = '\0';
+ }
fclose(messFp);
- header[sizeof(header)-1] = '\0';
return header;
}
@@ -1699,7 +1706,7 @@
fname, "\": ", Tcl_PosixError(interp), (char*)NULL);
return NULL;
}
- while (fgets(buf, sizeof(buf), messFp), !feof(messFp)) {
+ while (fgets(buf, sizeof(buf), messFp) != NULL && !feof(messFp)) {
if ('\n' == buf[0] || '\r' == buf[0]) {
break;
}
@@ -1969,7 +1976,7 @@
fdDst = open(buf2, O_WRONLY|O_TRUNC|O_CREAT, 0666);
do {
len = SafeRead(fdSrc, buf, sizeof(buf));
- if (0 > write(fdDst, buf, len)) {
+ if (0 > safe_write(fdDst, buf, len)) {
error = errno;
len = 0;
}
@@ -2222,7 +2229,8 @@
Tcl_HashTable *tablePtr, int fix)
{
char buf[1024], path[1024];
- int seq = -1, i;
+ unsigned long seq = 0, maxnum = 0, num, fact;
+ int i;
Tcl_HashEntry *entryPtr;
RatDbItem *itemPtr;
struct dirent *entPtr;
@@ -2252,7 +2260,9 @@
}
}
} else {
- fscanf(fp, "%d", &seq);
+ if (1 != fscanf(fp, "%ld", &seq)) {
+ seq = -1;
+ }
fclose(fp);
}
}
@@ -2306,6 +2316,15 @@
}
entryPtr = Tcl_CreateHashEntry(tablePtr, buf, &i);
Tcl_SetHashValue(entryPtr, (ClientData)itemPtr);
+
+ /* Check sequence number */
+ num = 0;
+ for (i=0, fact=1; isdigit(entPtr->d_name[i]); i++, fact *= 10) {
+ num += (entPtr->d_name[i]-'0') * fact;
+ }
+ if (num > maxnum) {
+ maxnum = num;
+ }
} else if (S_IFDIR == (sbuf.st_mode&S_IFMT)) {
if (prefix && *prefix) {
snprintf(path, sizeof(path), "%s/%s", prefix, entPtr->d_name);
@@ -2320,6 +2339,19 @@
}
}
closedir(dirPtr);
+
+ if (maxnum > seq) {
+ snprintf(buf, sizeof(buf),
+ "Bad sequence number was %ld but expected %ld", seq, maxnum);
+ Tcl_DStringAppendElement(dsPtr, buf);
+ if (fix) {
+ snprintf(path, sizeof(buf), "%s/.seq", dir);
+ if (NULL != (fp = fopen(path, "w"))) {
+ fprintf(fp, "%ld", maxnum);
+ fclose(fp);
+ }
+ }
+ }
}
@@ -2410,7 +2442,9 @@
Tcl_SetResult(interp, "Failed to open index.info file", TCL_STATIC);
return TCL_ERROR;
} else {
- fscanf(fp, "%d %d", &i, &indexInfo);
+ if (2 != fscanf(fp, "%d %d", &i, &indexInfo)) {
+ i = -1;
+ }
fclose(fp);
if (i != DBASE_VERSION) {
Tcl_SetResult(interp, "Wrong version of dbase", TCL_STATIC);
@@ -2438,7 +2472,7 @@
*/
snprintf(buf, sizeof(buf), "%s/index.changes", dbDir);
if (NULL != (fp = fopen(buf, "r"))) {
- while (fgets(buf, sizeof(buf), fp), !feof(fp)) {
+ while (fgets(buf, sizeof(buf), fp) != NULL && !feof(fp)) {
switch (buf[0]) {
case 'a':
indexInfo++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratDisFolder.c new/tkrat/lib/ratDisFolder.c
--- old/tkrat/lib/ratDisFolder.c 2007-08-16 06:45:30.000000000 +0200
+++ new/tkrat/lib/ratDisFolder.c 2009-06-30 22:13:29.000000000 +0200
@@ -1147,7 +1147,7 @@
rat_sequence_t seq = RatSequenceInit();
buf[sizeof(buf)-1] = '\0';
- while (fgets(buf, sizeof(buf)-1, fp), !feof(fp)) {
+ while (fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) {
if (!strncmp(buf, "delete", 6)) {
RatSequenceAdd(seq, atol(buf+7));
}
@@ -1186,7 +1186,7 @@
fseek(fp, 0, SEEK_SET);
- while (fgets(buf, sizeof(buf)-1, fp), !feof(fp)) {
+ while (fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) {
if (!strncmp(buf, "flag", 4)) {
sscanf(buf+5, "%ld %d %d", &uid, &f, &value);
flag = f;
@@ -1469,7 +1469,7 @@
Tcl_DString ds;
STRING string;
SEARCHPGM *pgm;
- int i;
+ int i, unused;
FILE *stateFp;
long mapPos;
@@ -1515,11 +1515,11 @@
stateFp = fopen(statetmp, "w");
if (0>fprintf(stateFp, "%ld\n%ld\n", masterStream->uid_validity,uid)){
fclose(stateFp);
- ftruncate(fileno(mapFp), mapPos);
+ unused = ftruncate(fileno(mapFp), mapPos);
goto disk_full;
}
if (0 != fclose(stateFp)) {
- ftruncate(fileno(mapFp), mapPos);
+ unused = ftruncate(fileno(mapFp), mapPos);
unlink(statetmp);
goto disk_full;
}
@@ -1534,7 +1534,7 @@
RatPurgeFlags(MsgFlags(elt), 0),
datebuf, &string)) {
Tcl_DStringFree(&ds);
- ftruncate(fileno(mapFp), mapPos);
+ unused = ftruncate(fileno(mapFp), mapPos);
unlink(statetmp);
goto disk_full;
}
@@ -1661,7 +1661,7 @@
snprintf(buf, sizeof(buf), "%s/mappings", dir);
if (NULL != (fp = fopen(buf, "r"))) {
buf[sizeof(buf)-1] = '\0';
- while(fgets(buf, sizeof(buf)-1, fp), !feof(fp)) {
+ while(fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) {
if (strchr(buf, '<')) {
ReadOldMappings(s, mapPtr, buf, sizeof(buf)-1, fp);
break;
@@ -1715,7 +1715,7 @@
lPtr = (unsigned long*)ckalloc(sizeof(unsigned long));
*lPtr = atol(buf);
Tcl_SetHashValue(entryPtr, lPtr);
- } while (fgets(buf, buflen, fp), !feof(fp));
+ } while (fgets(buf, buflen, fp) && !feof(fp));
/*
* Loop through folder and add the new mappings to the real map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratFolder.c new/tkrat/lib/ratFolder.c
--- old/tkrat/lib/ratFolder.c 2006-07-19 23:15:08.000000000 +0200
+++ new/tkrat/lib/ratFolder.c 2009-07-01 21:36:13.000000000 +0200
@@ -1579,7 +1579,7 @@
tm.tm_wday = 0;
tm.tm_yday = 0;
tm.tm_isdst = -1;
- /* time represents the time teh message was sent, without
+ /* time represents the time the message was sent, without
* the time zone factor. So when rendered in gmt it gives
* correct date/time. */
time = mktime(&tm);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratHold.c new/tkrat/lib/ratHold.c
--- old/tkrat/lib/ratHold.c 2004-07-09 19:43:52.000000000 +0200
+++ new/tkrat/lib/ratHold.c 2009-06-30 22:13:29.000000000 +0200
@@ -161,11 +161,13 @@
&& 'c' == direntPtr->d_name[l-1]) {
snprintf(buf, sizeof(buf), "%s/%s", dir, direntPtr->d_name);
fPtr = fopen(buf, "r");
- fgets(buf, sizeof(buf), fPtr);
+ if (!fgets(buf, sizeof(buf), fPtr)) {
+ buf[0] = '\0';
+ }
fclose(fPtr);
buf[strlen(buf)-1] = '\0';
Tcl_ListObjAppendElement(interp, oPtr, Tcl_NewStringObj(buf, -1));
- snprintf(buf, sizeof(buf), direntPtr->d_name);
+ snprintf(buf, sizeof(buf), "%s", direntPtr->d_name);
if (fileListPtr) {
Tcl_ListObjAppendElement(interp, fileListPtr,
Tcl_NewStringObj(buf, strlen(buf)-5));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratPGPprog.c new/tkrat/lib/ratPGPprog.c
--- old/tkrat/lib/ratPGPprog.c 2007-08-16 06:45:30.000000000 +0200
+++ new/tkrat/lib/ratPGPprog.c 2010-01-05 21:52:39.000000000 +0100
@@ -119,7 +119,7 @@
char *printed;
int size = strlen(args)+16;
- pipe(statusPipe);
+ if (pipe(statusPipe)) return 0;
printed = (char*)ckalloc(size);
snprintf(printed, size, args, statusPipe[1]);
Tcl_DStringAppend(&cmd, printed, -1);
@@ -140,8 +140,12 @@
if ( 0 > (out = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0600))) {
return 0;
}
- pipe(toPipe);
- pipe(errPipe);
+ if (pipe(toPipe)) return 0;
+ if (pipe(errPipe)) {
+ close(toPipe[0]);
+ close(toPipe[1]);
+ return 0;
+ }
if (0 == (pid = fork())) {
getrlimit(RLIMIT_NOFILE, &rlim);
for (i=0; i