Hello community,
here is the log from the commit of package xorg-x11-libICE
checked in at Sat Aug 25 00:09:12 CEST 2007.
--------
--- xorg-x11-libICE/xorg-x11-libICE.changes 2006-12-16 06:03:55.000000000 +0100
+++ /mounts/work_src_done/STABLE/xorg-x11-libICE/xorg-x11-libICE.changes 2007-08-24 15:47:37.563186000 +0200
@@ -1,0 +2,11 @@
+Fri Aug 24 15:43:39 CEST 2007 - sndirsch@suse.de
+
+- libICE 1.0.4
+ * Coverity #1085: Double free of pointer "*listenObjsRet"
+ * Coverity #1086: Double free of pointer "*listenObjsRet"
+ * Convert authutil.c static helpers to ANSI C prototypes to clear
+ sparse warnings
+ * Provide ANSI C prototypes for more static functions
+ * Replace many malloc(strlen()); strcpy() pairs with strdup()
+
+-------------------------------------------------------------------
Old:
----
libICE-1.0.3.tar.bz2
New:
----
libICE-1.0.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-libICE.spec ++++++
--- /var/tmp/diff_new_pack.Z32558/_old 2007-08-25 00:08:54.000000000 +0200
+++ /var/tmp/diff_new_pack.Z32558/_new 2007-08-25 00:08:54.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xorg-x11-libICE (Version 7.2)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,11 +11,11 @@
# norootforbuild
Name: xorg-x11-libICE
-%define dirsuffix 1.0.3
+%define dirsuffix 1.0.4
BuildRequires: pkgconfig xorg-x11-proto-devel xorg-x11-xtrans-devel
Url: http://xorg.freedesktop.org/
Version: 7.2
-Release: 15
+Release: 55
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Libraries
@@ -91,7 +91,15 @@
/usr/%{_lib}/*.so
/usr/%{_lib}/pkgconfig/*.pc
-%changelog -n xorg-x11-libICE
+%changelog
+* Fri Aug 24 2007 - sndirsch@suse.de
+- libICE 1.0.4
+ * Coverity #1085: Double free of pointer "*listenObjsRet"
+ * Coverity #1086: Double free of pointer "*listenObjsRet"
+ * Convert authutil.c static helpers to ANSI C prototypes to clear
+ sparse warnings
+ * Provide ANSI C prototypes for more static functions
+ * Replace many malloc(strlen()); strcpy() pairs with strdup()
* Sat Dec 16 2006 - sndirsch@suse.de
- update to release 1.0.3
* Makefile.am: make ChangeLog hook safer
++++++ libICE-1.0.3.tar.bz2 -> libICE-1.0.4.tar.bz2 ++++++
++++ 21491 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/ChangeLog new/libICE-1.0.4/ChangeLog
--- old/libICE-1.0.3/ChangeLog 2006-12-16 00:21:49.000000000 +0100
+++ new/libICE-1.0.4/ChangeLog 2007-08-20 22:23:25.000000000 +0200
@@ -1,3 +1,65 @@
+commit f415da71dd26f128df7d550ecd7631f8888eb1d2
+Author: Alan Coopersmith
+Date: Mon Aug 20 13:21:07 2007 -0700
+
+ Version bump: 1.0.4
+
+commit 8e08d3e4b8f00151b3a8b7eb88015dc15170e154
+Author: Alan Coopersmith
+Date: Mon Jun 4 15:40:22 2007 -0700
+
+ Add $(AM_CFLAGS) to lint flags to get correct Xtrans flags
+
+commit cd900e40b5676874d076c35466fd7baa6a49b1f6
+Author: Alan Coopersmith
+Date: Thu Apr 5 15:05:52 2007 -0700
+
+ Replace many malloc(strlen()); strcpy() pairs with strdup()
+
+commit 27f9a9324d58c9a7472c724c62f5b7ea0e1f4681
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:43:05 2007 -0700
+
+ Provide ANSI C prototypes for more static functions
+
+commit bb639803a779ceace05d183b653da88f010ab29c
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:32:31 2007 -0700
+
+ Convert authutil.c static helpers to ANSI C prototypes to clear sparse warnings
+
+commit 2179b2d467d69e45559b8e4f161a904a21f05321
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:28:06 2007 -0700
+
+ Add hooks for checking source code with lint/sparse/etc.
+
+commit 6b361c028b5ad931b61df86fae570f3ef9f41c15
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:19:56 2007 -0700
+
+ Coverity #1086: Double free of pointer "*listenObjsRet"
+
+ Same bug, different function.
+
+commit c9b3d016681d81aff32c74cdad75151bd538e6ab
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:07:42 2007 -0700
+
+ Coverity #1085: Double free of pointer "*listenObjsRet"
+
+ If malloc failed in the loop in IceListenForConnections, the error path
+ would free all previous allocations, then loop around and try again, and
+ if it failed again, free the previous allocations again. On the other
+ hand, if it succeeded on the later tries, then the memory would just be
+ leaked, since the error would be returned and not the pointer to them.
+
+commit 6039e865470af23948b0fe7d5dc0ea72da436b0e
+Author: Alan Coopersmith
+Date: Thu Apr 5 14:04:01 2007 -0700
+
+ Add *~ to .gitignore to skip emacs/patch droppings
+
commit bed718894bed98cbd45b02bd57fb7fc6fd5089aa
Author: Daniel Stone
Date: Sat Dec 16 01:21:17 2006 +0200
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/config.h.in new/libICE-1.0.4/config.h.in
--- old/libICE-1.0.3/config.h.in 2006-12-16 00:21:39.000000000 +0100
+++ new/libICE-1.0.4/config.h.in 2007-08-20 22:21:48.000000000 +0200
@@ -39,6 +39,9 @@
/* Support IPv6 for TCP connections */
#undef IPv6
+/* Support os-specific local connections */
+#undef LOCALCONN
+
/* Name of package */
#undef PACKAGE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/configure.ac new/libICE-1.0.4/configure.ac
--- old/libICE-1.0.3/configure.ac 2006-12-16 00:21:06.000000000 +0100
+++ new/libICE-1.0.4/configure.ac 2007-08-20 22:20:36.000000000 +0200
@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([libICE],
- 1.0.3,
+ 1.0.4,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
libICE)
@@ -36,6 +36,11 @@
# Checks for header files.
AC_HEADER_STDC
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+XORG_LINT_LIBRARY([ICE])
+LINT_FLAGS="${LINT_FLAGS} ${ICE_CFLAGS} ${XTRANS_CFLAGS}"
+
if test "x$GCC" = "xyes"; then
GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/Makefile.am new/libICE-1.0.4/Makefile.am
--- old/libICE-1.0.3/Makefile.am 2006-12-06 17:57:57.000000000 +0100
+++ new/libICE-1.0.4/Makefile.am 2007-04-05 23:24:35.000000000 +0200
@@ -10,3 +10,8 @@
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
dist-hook: ChangeLog
+
+if LINT
+lint:
+ (cd src && $(MAKE) $(MFLAGS) lint)
+endif LINT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/missing new/libICE-1.0.4/missing
--- old/libICE-1.0.3/missing 2006-12-16 00:21:41.000000000 +0100
+++ new/libICE-1.0.4/missing 2007-08-20 22:21:49.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
@@ -33,6 +33,8 @@
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/accept.c new/libICE-1.0.4/src/accept.c
--- old/libICE-1.0.3/src/accept.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/accept.c 2007-04-05 23:47:21.000000000 +0200
@@ -92,8 +92,7 @@
iceConn->send_sequence = 0;
iceConn->receive_sequence = 0;
- iceConn->connection_string = (char *) malloc (
- strlen (listenObj->network_id) + 1);
+ iceConn->connection_string = strdup(listenObj->network_id);
if (iceConn->connection_string == NULL)
{
@@ -102,8 +101,6 @@
*statusRet = IceAcceptBadMalloc;
return (NULL);
}
- else
- strcpy (iceConn->connection_string, listenObj->network_id);
iceConn->vendor = NULL;
iceConn->release = NULL;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/authutil.c new/libICE-1.0.4/src/authutil.c
--- old/libICE-1.0.3/src/authutil.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/authutil.c 2007-04-05 23:31:45.000000000 +0200
@@ -55,12 +55,12 @@
#endif
#endif
-static Status read_short ();
-static Status read_string ();
-static Status read_counted_string ();
-static Status write_short ();
-static Status write_string ();
-static Status write_counted_string ();
+static Status read_short (FILE *file, unsigned short *shortp);
+static Status read_string (FILE *file, char **stringp);
+static Status read_counted_string (FILE *file, unsigned short *countp, char **stringp);
+static Status write_short (FILE *file, unsigned short s);
+static Status write_string (FILE *file, char *string);
+static Status write_counted_string (FILE *file, unsigned short count, char *string);
@@ -71,7 +71,7 @@
*/
char *
-IceAuthFileName ()
+IceAuthFileName (void)
{
static char slashDotICEauthority[] = "/.ICEauthority";
@@ -393,11 +393,7 @@
*/
static Status
-read_short (file, shortp)
-
-FILE *file;
-unsigned short *shortp;
-
+read_short (FILE *file, unsigned short *shortp)
{
unsigned char file_short[2];
@@ -410,10 +406,7 @@
static Status
-read_string (file, stringp)
-
-FILE *file;
-char **stringp;
+read_string (FILE *file, char **stringp)
{
unsigned short len;
@@ -445,12 +438,7 @@
static Status
-read_counted_string (file, countp, stringp)
-
-FILE *file;
-unsigned short *countp;
-char **stringp;
-
+read_counted_string (FILE *file, unsigned short *countp, char **stringp)
{
unsigned short len;
char *data;
@@ -484,11 +472,7 @@
static Status
-write_short (file, s)
-
-FILE *file;
-unsigned short s;
-
+write_short (FILE *file, unsigned short s)
{
unsigned char file_short[2];
@@ -503,11 +487,7 @@
static Status
-write_string (file, string)
-
-FILE *file;
-char *string;
-
+write_string (FILE *file, char *string)
{
unsigned short count = strlen (string);
@@ -522,12 +502,7 @@
static Status
-write_counted_string (file, count, string)
-
-FILE *file;
-unsigned short count;
-char *string;
-
+write_counted_string (FILE *file, unsigned short count, char *string)
{
if (!write_short (file, count))
return (0);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/connect.c new/libICE-1.0.4/src/connect.c
--- old/libICE-1.0.3/src/connect.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/connect.c 2007-04-05 23:49:25.000000000 +0200
@@ -36,7 +36,8 @@
#include
#include "globals.h"
-static XtransConnInfo ConnectToPeer();
+static XtransConnInfo ConnectToPeer(char *networkIdsList,
+ char **actualConnectionRet);
#define Strstr strstr
@@ -449,11 +450,7 @@
static XtransConnInfo
-ConnectToPeer (networkIdsList, actualConnectionRet)
-
-char *networkIdsList;
-char **actualConnectionRet;
-
+ConnectToPeer (char *networkIdsList, char **actualConnectionRet)
{
char addrbuf[256];
char* address;
@@ -527,9 +524,7 @@
* We need to return the actual network connection string
*/
- *actualConnectionRet = (char *) malloc (strlen (address) + 1);
- strcpy (*actualConnectionRet, address);
-
+ *actualConnectionRet = strdup(address);
/*
* Return the file descriptor
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/getauth.c new/libICE-1.0.4/src/getauth.c
--- old/libICE-1.0.3/src/getauth.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/getauth.c 2007-04-05 23:40:33.000000000 +0200
@@ -35,7 +35,8 @@
#include "ICElibint.h"
#include
-static Bool auth_valid ();
+static Bool auth_valid (const char *auth_name, int num_auth_names,
+ char **auth_names, int *index_ret);
extern int _IcePaAuthDataEntryCount;
extern IceAuthDataEntry _IcePaAuthDataEntries[];
@@ -244,12 +245,8 @@
*/
static Bool
-auth_valid (auth_name, num_auth_names, auth_names, index_ret)
-
-char *auth_name;
-int num_auth_names;
-char **auth_names;
-int *index_ret;
+auth_valid (const char *auth_name, int num_auth_names,
+ char **auth_names, int *index_ret)
{
/*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/iceauth.c new/libICE-1.0.4/src/iceauth.c
--- old/libICE-1.0.3/src/iceauth.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/iceauth.c 2007-04-05 23:51:35.000000000 +0200
@@ -38,7 +38,7 @@
#include
#define Time_t time_t
-static int binaryEqual ();
+static int binaryEqual (const char *a, const char *b, unsigned len);
static int was_called_state;
@@ -135,12 +135,10 @@
if (!data)
{
- char *tempstr =
+ const char *tempstr =
"Could not find correct MIT-MAGIC-COOKIE-1 authentication";
- *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
- if (*errorStringRet)
- strcpy (*errorStringRet, tempstr);
+ *errorStringRet = strdup(tempstr);
return (IcePoAuthFailed);
}
@@ -161,11 +159,10 @@
* a single pass authentication method.
*/
- char *tempstr = "MIT-MAGIC-COOKIE-1 authentication internal error";
+ const char *tempstr =
+ "MIT-MAGIC-COOKIE-1 authentication internal error";
- *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
- if (*errorStringRet)
- strcpy (*errorStringRet, tempstr);
+ *errorStringRet = strdup(tempstr);
return (IcePoAuthFailed);
}
@@ -226,11 +223,10 @@
}
else
{
- char *tempstr = "MIT-MAGIC-COOKIE-1 authentication rejected";
+ const char *tempstr
+ = "MIT-MAGIC-COOKIE-1 authentication rejected";
- *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
- if (*errorStringRet)
- strcpy (*errorStringRet, tempstr);
+ *errorStringRet = strdup(tempstr);
stat = IcePaAuthRejected;
}
@@ -246,12 +242,10 @@
* always find a valid entry.
*/
- char *tempstr =
+ const char *tempstr =
"MIT-MAGIC-COOKIE-1 authentication internal error";
- *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
- if (*errorStringRet)
- strcpy (*errorStringRet, tempstr);
+ *errorStringRet = strdup(tempstr);
return (IcePaAuthFailed);
}
@@ -265,10 +259,7 @@
*/
static int
-binaryEqual (a, b, len)
-
-register char *a, *b;
-register unsigned len;
+binaryEqual (const char *a, const char *b, unsigned len)
{
while (len--)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/listen.c new/libICE-1.0.4/src/listen.c
--- old/libICE-1.0.3/src/listen.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/listen.c 2007-04-05 23:52:31.000000000 +0200
@@ -123,8 +123,10 @@
free ((char *) (*listenObjsRet)[j]);
free ((char *) *listenObjsRet);
+ *listenObjsRet = NULL;
status = 0;
+ break;
}
else
{
@@ -175,14 +177,7 @@
IceListenObj listenObj;
{
- char *networkId;
-
- networkId = (char *) malloc (strlen (listenObj->network_id) + 1);
-
- if (networkId)
- strcpy (networkId, listenObj->network_id);
-
- return (networkId);
+ return strdup(listenObj->network_id);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/listenwk.c new/libICE-1.0.4/src/listenwk.c
--- old/libICE-1.0.3/src/listenwk.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/listenwk.c 2007-04-05 23:17:15.000000000 +0200
@@ -127,8 +127,10 @@
free ((char *) (*listenObjsRet)[j]);
free ((char *) *listenObjsRet);
+ *listenObjsRet = NULL;
status = 0;
+ break;
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/Makefile.am new/libICE-1.0.4/src/Makefile.am
--- old/libICE-1.0.3/src/Makefile.am 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/Makefile.am 2007-06-05 00:39:32.000000000 +0200
@@ -38,3 +38,11 @@
$(top_srcdir)/include/X11/ICE/ICEmsg.h \
$(top_srcdir)/include/X11/ICE/ICEproto.h \
$(top_srcdir)/include/X11/ICE/ICEutil.h
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+
+lint:
+ $(LINT) $(ALL_LINT_FLAGS) $(libICE_la_SOURCES) $(XINERAMA_LIBS)
+endif LINT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/misc.c new/libICE-1.0.4/src/misc.c
--- old/libICE-1.0.3/src/misc.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/misc.c 2007-04-05 23:54:08.000000000 +0200
@@ -129,12 +129,7 @@
IceConn iceConn;
{
- char *string = (char *) malloc (strlen (iceConn->vendor) + 1);
-
- if (string)
- strcpy (string, iceConn->vendor);
-
- return (string);
+ return strdup(iceConn->vendor);
}
@@ -144,12 +139,7 @@
IceConn iceConn;
{
- char *string = (char *) malloc (strlen (iceConn->release) + 1);
-
- if (string)
- strcpy (string, iceConn->release);
-
- return (string);
+ return strdup(iceConn->release);
}
@@ -191,13 +181,7 @@
{
if (iceConn->connection_string)
{
- char *string = (char *) malloc (
- strlen (iceConn->connection_string) + 1);
-
- if (string)
- strcpy (string, iceConn->connection_string);
-
- return (string);
+ return strdup(iceConn->connection_string);
}
else
return (NULL);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/process.c new/libICE-1.0.4/src/process.c
--- old/libICE-1.0.3/src/process.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/process.c 2007-06-05 00:38:02.000000000 +0200
@@ -615,7 +615,7 @@
_IceConnectionError *errorReply =
&(((_IceReply *) (replyWait->reply))->connection_error);
char *errorStr = NULL;
- char *tempstr;
+ const char *tempstr;
char *prefix, *temp;
invokeHandler = 0;
@@ -627,16 +627,14 @@
tempstr =
"None of the ICE versions specified are supported";
- errorStr = (char *) malloc (strlen (tempstr) + 1);
- strcpy (errorStr, tempstr);
+ errorStr = strdup(tempstr);
break;
case IceNoAuth:
tempstr =
"None of the authentication protocols specified are supported";
- errorStr = (char *) malloc (strlen (tempstr) + 1);
- strcpy (errorStr, tempstr);
+ errorStr = strdup(tempstr);
break;
case IceSetupFailed:
@@ -697,16 +695,14 @@
temp =
"None of the protocol versions specified are supported";
- errorStr = (char *) malloc (strlen (temp) + 1);
- strcpy (errorStr, temp);
+ errorStr = strdup(temp);
break;
case IceNoAuth:
temp =
"None of the authentication protocols specified are supported";
- errorStr = (char *) malloc (strlen (temp) + 1);
- strcpy (errorStr, temp);
+ errorStr = strdup(temp);
break;
case IceSetupFailed:
@@ -1129,11 +1125,11 @@
_IceConnectionError *errorReply =
&(((_IceReply *) (replyWait->reply))->connection_error);
- char *tempstr = "Received bad authIndex in the AuthRequired message";
+ const char *tempstr
+ = "Received bad authIndex in the AuthRequired message";
char errIndex = (int) message->authIndex;
- errorString = (char *) malloc (strlen (tempstr) + 1);
- strcpy (errorString, tempstr);
+ errorString = strdup(tempstr);
errorReply->type = ICE_CONNECTION_ERROR;
errorReply->error_message = errorString;
@@ -1159,11 +1155,11 @@
_IceProtocolError *errorReply =
&(((_IceReply *) (replyWait->reply))->protocol_error);
- char *tempstr = "Received bad authIndex in the AuthRequired message";
+ const char *tempstr
+ = "Received bad authIndex in the AuthRequired message";
char errIndex = (int) message->authIndex;
- errorString = (char *) malloc (strlen (tempstr) + 1);
- strcpy (errorString, tempstr);
+ errorString = strdup(tempstr);
errorReply->type = ICE_PROTOCOL_ERROR;
errorReply->error_message = errorString;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/register.c new/libICE-1.0.4/src/register.c
--- old/libICE-1.0.3/src/register.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/register.c 2007-04-05 23:59:16.000000000 +0200
@@ -85,8 +85,7 @@
char *name;
_IceProtocols[_IceLastMajorOpcode].protocol_name = name =
- (char *) malloc (strlen (protocolName) + 1);
- strcpy (name, protocolName);
+ strdup(protocolName);
p = _IceProtocols[_IceLastMajorOpcode].orig_client =
(_IcePoProtocol *) malloc (sizeof (_IcePoProtocol));
@@ -96,11 +95,8 @@
opcodeRet = ++_IceLastMajorOpcode;
}
- p->vendor = (char *) malloc (strlen (vendor) + 1);
- strcpy (p->vendor, vendor);
-
- p->release = (char *) malloc (strlen (release) + 1);
- strcpy (p->release, release);
+ p->vendor = strdup(vendor);
+ p->release = strdup(release);
p->version_count = versionCount;
@@ -119,10 +115,7 @@
for (i = 0; i < authCount; i++)
{
- p->auth_names[i] =
- (char *) malloc (strlen (authNames[i]) + 1);
- strcpy (p->auth_names[i], authNames[i]);
-
+ p->auth_names[i] = strdup(authNames[i]);
p->auth_procs[i] = authProcs[i];
}
}
@@ -197,8 +190,7 @@
char *name;
_IceProtocols[_IceLastMajorOpcode].protocol_name = name =
- (char *) malloc (strlen (protocolName) + 1);
- strcpy (name, protocolName);
+ strdup(protocolName);
_IceProtocols[_IceLastMajorOpcode].orig_client = NULL;
@@ -208,11 +200,8 @@
opcodeRet = ++_IceLastMajorOpcode;
}
- p->vendor = (char *) malloc (strlen (vendor) + 1);
- strcpy (p->vendor, vendor);
-
- p->release = (char *) malloc (strlen (release) + 1);
- strcpy (p->release, release);
+ p->vendor = strdup(vendor);
+ p->release = strdup(release);
p->version_count = versionCount;
@@ -234,10 +223,7 @@
for (i = 0; i < authCount; i++)
{
- p->auth_names[i] =
- (char *) malloc (strlen (authNames[i]) + 1);
- strcpy (p->auth_names[i], authNames[i]);
-
+ p->auth_names[i] = strdup(authNames[i]);
p->auth_procs[i] = authProcs[i];
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libICE-1.0.3/src/setauth.c new/libICE-1.0.4/src/setauth.c
--- old/libICE-1.0.3/src/setauth.c 2006-12-06 17:15:32.000000000 +0100
+++ new/libICE-1.0.4/src/setauth.c 2007-04-06 00:03:40.000000000 +0200
@@ -96,20 +96,14 @@
_IcePaAuthDataEntryCount++;
}
- _IcePaAuthDataEntries[j].protocol_name = (char *) malloc (
- strlen (entries[i].protocol_name) + 1);
- strcpy (_IcePaAuthDataEntries[j].protocol_name,
- entries[i].protocol_name);
+ _IcePaAuthDataEntries[j].protocol_name
+ = strdup(entries[i].protocol_name);
- _IcePaAuthDataEntries[j].network_id = (char *) malloc (
- strlen (entries[i].network_id) + 1);
- strcpy (_IcePaAuthDataEntries[j].network_id,
- entries[i].network_id);
+ _IcePaAuthDataEntries[j].network_id
+ = strdup(entries[i].network_id);
- _IcePaAuthDataEntries[j].auth_name = (char *) malloc (
- strlen (entries[i].auth_name) + 1);
- strcpy (_IcePaAuthDataEntries[j].auth_name,
- entries[i].auth_name);
+ _IcePaAuthDataEntries[j].auth_name
+ = strdup(entries[i].auth_name);
_IcePaAuthDataEntries[j].auth_data_length =
entries[i].auth_data_length;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org