Hello community, here is the log from the commit of package libFS for openSUSE:Factory checked in at 2013-06-05 11:53:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libFS (Old) and /work/SRC/openSUSE:Factory/.libFS.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libFS" Changes: -------- --- /work/SRC/openSUSE:Factory/libFS/libFS.changes 2013-03-22 11:26:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libFS.new/libFS.changes 2013-06-05 11:53:49.000000000 +0200 @@ -1,0 +2,11 @@ +Wed May 29 22:38:34 UTC 2013 - [email protected] + +- Update to version 1.0.5: + This minor bugfix release includes the fix for the security issue recently + reported as CVE-2013-1996, as well as a number of other cleanups of the + memory allocation & error handling code noticed while working on that. +- Packaging changes: + + Remove upstreamed patch: U_prototype_error.patch + Included in this release + +------------------------------------------------------------------- Old: ---- U_prototype_error.patch libFS-1.0.4.tar.bz2 New: ---- libFS-1.0.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libFS.spec ++++++ --- /var/tmp/diff_new_pack.7GExf3/_old 2013-06-05 11:53:50.000000000 +0200 +++ /var/tmp/diff_new_pack.7GExf3/_new 2013-06-05 11:53:50.000000000 +0200 @@ -18,7 +18,7 @@ Name: libFS %define lname libFS6 -Version: 1.0.4 +Version: 1.0.5 Release: 0 Summary: X Font Service client library License: MIT @@ -30,8 +30,6 @@ Source: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2 Source2: baselibs.conf -Patch1: U_prototype_error.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-build #git#BuildRequires: autoconf >= 2.60, automake, libtool BuildRequires: pkgconfig @@ -67,8 +65,6 @@ %prep %setup -q -%patch1 -p1 - %build %configure --docdir=%_docdir/%name --disable-static make %{?_smp_mflags} ++++++ libFS-1.0.4.tar.bz2 -> libFS-1.0.5.tar.bz2 ++++++ ++++ 12825 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/libFS-1.0.4/ChangeLog new/libFS-1.0.5/ChangeLog --- old/libFS-1.0.4/ChangeLog 2012-03-03 04:48:14.000000000 +0100 +++ new/libFS-1.0.5/ChangeLog 2013-05-29 02:18:34.000000000 +0200 @@ -1,3 +1,155 @@ +commit 9d1458e02fe8dcac68b32917c9b10fa49d7161e7 +Author: Alan Coopersmith <[email protected]> +Date: Tue May 28 17:17:40 2013 -0700 + + libFS 1.0.5 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 26dc23446c2e7818fdebfb46e101bac4883df07e +Author: Alan Coopersmith <[email protected]> +Date: Sun Apr 14 09:07:32 2013 -0700 + + Sign extension issue and integer overflow in FSOpenServer() [CVE-2013-1996] + + > altlen = (int) *ad++; <-- if char is 0xff, will sign extend to int (0xffffffff == -1) + > alts[i].name = (char *) FSmalloc(altlen + 1); <-- -1 + 1 == 0 + > ... + > memmove(alts[i].name, ad, altlen); <-- memory corruption + + Reported-by: Ilja Van Sprundel <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit f6030dd569094fb29720a4bf54aec784b1edcac5 +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 21:43:40 2013 -0700 + + Get rid of more duplication in error cleanup code in FSListFontsWithXInfo + + Also get rely on free() to handle null pointers in cleanup code instead + of checking each one ourselves. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 1f260bfdcb8d83d6c21db70ad6ed0fa94e5f5abf +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 20:55:36 2013 -0700 + + Avoid accessing freed memory on realloc failure in FSListFontsWithXInfo + + Since we realloc 5 things in a row, and then check for failure, it's + quite possible one of our old pointers is now pointing to something + completely different, so instead update the pointers as we successfully + realloc them and then jump to the normal error processing cleanup if + one fails. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 3022dfdcdac08a4950695ded9f372e845f2be008 +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 19:04:22 2013 -0700 + + Avoid reading outside bounds when _FSReply receives an Error response + + Upon receiving a response, _FSReply copies the first 8 bytes into *rep + and then looks at them to determine what type of response. If it's an + error packet, it then converts to an error struct and reads the rest, + but it was copying 16 bytes out of *rep to begin with, due to sloppy + casting. Since we immediately overwrite the second 8 bytes with the + data coming off the wire, this isn't horrible, but it really freaks out + static analysis and memory debugging tools. + + Fixes parfait 1.1 warning: + + Error: Buffer overrun + Read Outside Array Bounds in STD C function: Read outside array bounds in call to llvm.memcpy.p0i8.p0i8.i64. Buffer ((char*)((union fsError*)rep)) of size ??? is read at an offset of 16 + size(((char*)((union fsError*)rep))) is 8, 16 is 16 + at line 751 of src/FSlibInt.c in function '_FSReply'. + called at line 67 of src/FSSync.c in function 'FSSync' with rep = ((union fsReply*)&rep). + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 932131874109931bb6d50acc47ac94e51a2353de +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 18:54:35 2013 -0700 + + Use NULL instead of 0 for null pointers + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 90b9754da977cb6804da4c38711ff33db772a9ca +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 18:30:24 2013 -0700 + + Get rid of unnecessary casts in FSfree calls + + No need to cast all other pointers to char *, since C89 free takes + any type of pointer. Casting all of them just hides errors if you + try to free something that's not really a pointer. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 2cf3ed903048758ee696d410aba6afefd1582dec +Author: Alan Coopersmith <[email protected]> +Date: Wed Apr 10 18:26:22 2013 -0700 + + Get rid of unnecessary casts in FS*alloc calls + + Stop taking 64-bit size_t, truncating to 32-bit unsigned int, and then + putting into a 64-bit size_t argument to underlying *alloc call. + + Also stop casting results, since in C, that just hides missing prototype + errors that can cause memory corruption when taking an implicit 32-bit + int return value and trying to make a 64-bit pointer out of it. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 0ef550010ad1cb08297951b385c0034010e89a9a +Author: Alan Coopersmith <[email protected]> +Date: Fri Jan 18 23:18:47 2013 -0800 + + Replace deprecated Automake INCLUDES variable with AM_CPPFLAGS + + Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html + + - Support for the long-deprecated INCLUDES variable will be removed + altogether in Automake 1.14. The AM_CPPFLAGS variable should be + used instead. + + This variable was deprecated in Automake releases prior to 1.10, which is + the current minimum level required to build X. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 464fb353a406cbb4c478fae89952979cb5c8775c +Author: Colin Walters <[email protected]> +Date: Wed Jan 4 17:37:06 2012 -0500 + + autogen.sh: Implement GNOME Build API + + http://people.gnome.org/~walters/docs/build-api.txt + + Signed-off-by: Adam Jackson <[email protected]> + +commit 0e0109c5d035c9f803b52d2189151f600de59866 +Author: Adam Jackson <[email protected]> +Date: Tue Jan 15 14:28:48 2013 -0500 + + configure: Remove AM_MAINTAINER_MODE + + Signed-off-by: Adam Jackson <[email protected]> + +commit 56c83935a873fa7c6bb0c8c7d9f755ee08439aa5 +Author: Thomas Klausner <[email protected]> +Date: Thu Jul 12 14:39:26 2012 +0200 + + Fix a prototype error + + Per NetBSD PR 41899 from Henning Petersen. + + Signed-off-by: Thomas Klausner <[email protected]> + Signed-off-by: Julien Cristau <[email protected]> + commit 589eea0713cacb7b6889d15e4dbcd2914684db9b Author: Alan Coopersmith <[email protected]> Date: Fri Mar 2 19:47:42 2012 -0800 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/libFS-1.0.4/configure.ac new/libFS-1.0.5/configure.ac --- old/libFS-1.0.4/configure.ac 2012-03-03 04:45:41.000000000 +0100 +++ new/libFS-1.0.5/configure.ac 2013-05-29 02:17:52.000000000 +0200 @@ -22,14 +22,13 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libFS], [1.0.4], +AC_INIT([libFS], [1.0.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libFS]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Initialize libtool AC_PROG_LIBTOOL 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/libFS-1.0.4/missing new/libFS-1.0.5/missing --- old/libFS-1.0.4/missing 2012-03-03 04:45:58.000000000 +0100 +++ new/libFS-1.0.5/missing 2013-05-29 02:18:14.000000000 +0200 @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-06-26.16; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <[email protected]>, 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,69 +25,40 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 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. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - 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 - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to <[email protected]>." exit $? @@ -100,272 +70,141 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# 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). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; +# Run the given program, remember its exit status. +"$@"; st=$? - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; +# If it succeeded, we are done. +test $st -eq 0 && exit 0 - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - 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 - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - 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 test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - 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 - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - 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 "$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` - # ... 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 - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) 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/libFS-1.0.4/src/FSFontInfo.c new/libFS-1.0.5/src/FSFontInfo.c --- old/libFS-1.0.4/src/FSFontInfo.c 2011-11-19 07:16:34.000000000 +0100 +++ new/libFS-1.0.5/src/FSFontInfo.c 2013-05-29 02:17:52.000000000 +0200 @@ -68,16 +68,17 @@ int i, j; size_t size = 0; - FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) 0; - FSPropInfo **pi = (FSPropInfo **) 0; - FSPropOffset **po = (FSPropOffset **) 0; - unsigned char **pd = (unsigned char **) 0; + FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) NULL; + FSPropInfo **pi = (FSPropInfo **) NULL; + FSPropOffset **po = (FSPropOffset **) NULL; + unsigned char **pd = (unsigned char **) NULL; char **flist = NULL; fsListFontsWithXInfoReply reply; fsListFontsWithXInfoReq *req; fsPropInfo local_pi; fsPropOffset local_po; Status status; + Bool eat_data = True; GetReq(ListFontsWithXInfo, req); req->maxNames = maxNames; @@ -101,26 +102,8 @@ SIZEOF(fsGenericReply)) >> 2), fsFalse); } if (!status) { - for (j = (i - 1); j >= 0; j--) { - FSfree((char *) fhdr[j]); - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); - FSfree(flist[j]); - } - if (flist) - FSfree((char *) flist); - if (fhdr) - FSfree((char *) fhdr); - if (pi) - FSfree((char *) pi); - if (po) - FSfree((char *) po); - if (pd) - FSfree((char *) pd); - - SyncHandle(); - return (char **) NULL; + eat_data = False; + goto badmem; } if (reply.nameLength == 0) /* got last reply in version 1 */ break; @@ -134,136 +117,67 @@ goto badmem; if (fhdr) { - FSXFontInfoHeader **tmp_fhdr = (FSXFontInfoHeader **) - FSrealloc((char *) fhdr, - (unsigned) (sizeof(FSXFontInfoHeader *) * size)); - char **tmp_flist = (char **) FSrealloc((char *) flist, - (unsigned) (sizeof(char *) * size)); - FSPropInfo **tmp_pi = (FSPropInfo **) - FSrealloc((char *) pi, - (unsigned) (sizeof(FSPropInfo *) * size)); - FSPropOffset **tmp_po = (FSPropOffset **) - FSrealloc((char *) po, - (unsigned) (sizeof(FSPropOffset *) * size)); - unsigned char **tmp_pd = (unsigned char **) - FSrealloc((char *) pd, - (unsigned) (sizeof(unsigned char *) * size)); - - if (!tmp_fhdr || !tmp_flist || !tmp_pi || !tmp_po || !tmp_pd) { - for (j = (i - 1); j >= 0; j--) { - FSfree((char *) flist[j]); - FSfree((char *) fhdr[j]); - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); - } - if (tmp_flist) - FSfree((char *) tmp_flist); - else - FSfree((char *) flist); - if (tmp_fhdr) - FSfree((char *) tmp_fhdr); - else - FSfree((char *) fhdr); - if (tmp_pi) - FSfree((char *) tmp_pi); - else - FSfree((char *) pi); - if (tmp_po) - FSfree((char *) tmp_po); - else - FSfree((char *) po); - if (tmp_pd) - FSfree((char *) tmp_pd); - else - FSfree((char *) pd); - goto clearwire; +#define ResizeArray(var, type) { \ + type **tmp = FSrealloc(var, sizeof(type *) * size); \ + if (tmp) \ + var = tmp; \ + else \ + goto badmem; \ } - fhdr = tmp_fhdr; - flist = tmp_flist; - pi = tmp_pi; - po = tmp_po; - pd = tmp_pd; + + ResizeArray(fhdr, FSXFontInfoHeader) + ResizeArray(flist, char) + ResizeArray(pi, FSPropInfo) + ResizeArray(po, FSPropOffset) + ResizeArray(pd, unsigned char) } else { - if (!(fhdr = (FSXFontInfoHeader **) - FSmalloc((unsigned) (sizeof(FSXFontInfoHeader *) * size)))) - goto clearwire; - if (!(flist = (char **) - FSmalloc((unsigned) (sizeof(char *) * size)))) { - FSfree((char *) fhdr); - goto clearwire; - } - if (!(pi = (FSPropInfo **) - FSmalloc((unsigned) (sizeof(FSPropInfo *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - goto clearwire; - } - if (!(po = (FSPropOffset **) - FSmalloc((unsigned) (sizeof(FSPropOffset *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - FSfree((char *) pi); - goto clearwire; - } - if (!(pd = (unsigned char **) - FSmalloc((unsigned) (sizeof(unsigned char *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - FSfree((char *) pi); - FSfree((char *) po); - goto clearwire; +#define InitArray(var, type) \ + if ((var = FSmalloc(sizeof(type *) * size)) == NULL) { \ + goto badmem; \ } + + InitArray(fhdr, FSXFontInfoHeader) + InitArray(flist, char) + InitArray(pi, FSPropInfo) + InitArray(po, FSPropOffset) + InitArray(pd, unsigned char) } } - fhdr[i] = (FSXFontInfoHeader *) FSmalloc(sizeof(FSXFontInfoHeader)); + fhdr[i] = FSmalloc(sizeof(FSXFontInfoHeader)); if (!fhdr[i]) { goto badmem; } FSUnpack_XFontInfoHeader(&reply, fhdr[i], FSProtocolVersion(svr)); /* alloc space for the name */ - flist[i] = (char *) FSmalloc((unsigned int) (reply.nameLength + 1)); + flist[i] = FSmalloc(reply.nameLength + 1); + if (!flist[i]) + goto cleanfhdr; if (FSProtocolVersion(svr) == 1) { /* get the name */ - if (!flist[i]) { - nbytes = (reply.nameLength + 3) & ~3; - _FSEatData(svr, (unsigned long) nbytes); - goto badmem; - } _FSReadPad(svr, flist[i], (long) reply.nameLength); flist[i][reply.nameLength] = '\0'; } - pi[i] = (FSPropInfo *) FSmalloc(sizeof(FSPropInfo)); - if (!pi[i]) { - FSfree((char *) fhdr[i]); - goto badmem; - } + pi[i] = FSmalloc(sizeof(FSPropInfo)); + if (!pi[i]) + goto cleanflist; _FSReadPad(svr, (char *) &local_pi, SIZEOF(fsPropInfo)); pi[i]->num_offsets = local_pi.num_offsets; pi[i]->data_len = local_pi.data_len; #if SIZE_MAX <= UINT_MAX if (pi[i]->num_offsets > SIZE_MAX / sizeof(FSPropOffset)) - goto badmem; + goto cleanpi; #endif - po[i] = (FSPropOffset *) - FSmalloc(pi[i]->num_offsets * sizeof(FSPropOffset)); - if (!po[i]) { - FSfree((char *) fhdr[i]); - FSfree((char *) pi[i]); - goto badmem; - } - pd[i] = (unsigned char *) FSmalloc(pi[i]->data_len); - if (!pd[i]) { - FSfree((char *) fhdr[i]); - FSfree((char *) pi[i]); - FSfree((char *) po[i]); - goto badmem; - } + po[i] = FSmalloc(pi[i]->num_offsets * sizeof(FSPropOffset)); + if (!po[i]) + goto cleanpi; + pd[i] = FSmalloc(pi[i]->data_len); + if (!pd[i]) + goto cleanpo; /* get offsets */ for (j=0; j<pi[i]->num_offsets; j++) { @@ -284,11 +198,6 @@ if (FSProtocolVersion(svr) != 1) { /* get the name */ - if (!flist[i]) { - nbytes = (reply.nameLength + 3) & ~3; - _FSEatData(svr, (unsigned long) nbytes); - goto badmem; - } _FSRead(svr, flist[i], (long) reply.nameLength); flist[i][reply.nameLength] = '\0'; @@ -297,7 +206,7 @@ } /* avoid integer overflow */ if (i > INT_MAX - 1) { - goto badmem; + goto cleanpd; } } *info = fhdr; @@ -308,37 +217,45 @@ SyncHandle(); return flist; +/* Error cleanup for when we're partway through filling in item #i in arrays */ +cleanpd: + FSfree(pd[i]); +cleanpo: + FSfree(po[i]); +cleanpi: + FSfree(pi[i]); +cleanflist: + FSfree(flist[i]); +cleanfhdr: + FSfree(fhdr[i]); +/* Error cleanup for all previously filled in items in the arrays */ badmem: for (j = (i - 1); j >= 0; j--) { - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); + FSfree(pi[j]); + FSfree(po[j]); + FSfree(pd[j]); FSfree(flist[j]); - FSfree((char *) fhdr[j]); + FSfree(fhdr[j]); + } + FSfree(flist); + FSfree(fhdr); + FSfree(pi); + FSfree(po); + FSfree(pd); + + if (eat_data) { + do { + fsPropInfo ti; + + _FSEatData(svr, (reply.nameLength + 3) & ~3); + _FSReadPad(svr, (char *) &ti, SIZEOF(fsPropInfo)); + _FSEatData(svr, (SIZEOF(fsPropOffset) * ti.num_offsets)); + _FSEatData(svr, ti.data_len); + } while (_FSReply(svr, (fsReply *) &reply, + ((SIZEOF(fsListFontsWithXInfoReply) + - SIZEOF(fsGenericReply)) >> 2), fsFalse) + && (reply.nameLength != 0)); } - if (flist) - FSfree((char *) flist); - if (fhdr) - FSfree((char *) fhdr); - if (pi) - FSfree((char *) pi); - if (po) - FSfree((char *) po); - if (pd) - FSfree((char *) pd); - - -clearwire: - do { - fsPropInfo ti; - - _FSEatData(svr, (reply.nameLength + 3) & ~3); - _FSReadPad(svr, (char *) &ti, SIZEOF(fsPropInfo)); - _FSEatData(svr, (SIZEOF(fsPropOffset) * ti.num_offsets)); - _FSEatData(svr, ti.data_len); - } while (_FSReply(svr, (fsReply *) & reply, - ((SIZEOF(fsListFontsWithXInfoReply) - - SIZEOF(fsGenericReply)) >> 2), fsFalse) && (reply.nameLength != 0)); SyncHandle(); return (char **) 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/libFS-1.0.4/src/FSFtNames.c new/libFS-1.0.5/src/FSFtNames.c --- old/libFS-1.0.4/src/FSFtNames.c 2011-11-19 07:16:34.000000000 +0100 +++ new/libFS-1.0.5/src/FSFtNames.c 2013-05-29 02:17:52.000000000 +0200 @@ -77,7 +77,7 @@ _FSSend(svr, pattern, nbytes); if (!_FSReply(svr, (fsReply *) & rep, (SIZEOF(fsListFontsReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return (char **) 0; + return (char **) NULL; if (rep.nFonts #if (SIZE_MAX >> 2) <= UINT_MAX @@ -85,13 +85,13 @@ && rep.length <= (SIZE_MAX >> 2) #endif ) { - flist = (char **) FSmalloc((unsigned) rep.nFonts * sizeof(char *)); + flist = FSmalloc(rep.nFonts * sizeof(char *)); rlen = (rep.length << 2) - SIZEOF(fsListFontsReply); - c = (char *) FSmalloc((unsigned) (rlen + 1)); + c = FSmalloc(rlen + 1); if ((!flist) || (!c)) { if (flist) - FSfree((char *) flist); + FSfree(flist); if (c) FSfree(c); _FSEatData(svr, (unsigned long) rlen); @@ -122,7 +122,7 @@ { if (list) { FSfree(list[0] - 1); - FSfree((char *) list); + FSfree(list); } return 1; } 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/libFS-1.0.4/src/FSGetCats.c new/libFS-1.0.5/src/FSGetCats.c --- old/libFS-1.0.4/src/FSGetCats.c 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/FSGetCats.c 2013-05-29 02:17:52.000000000 +0200 @@ -79,13 +79,12 @@ && rep.length <= (SIZE_MAX >> 2) #endif ) { - list = (char **) - FSmalloc((unsigned) (rep.num_catalogues * sizeof(char *))); + list = FSmalloc(rep.num_catalogues * sizeof(char *)); rlen = (rep.length << 2) - SIZEOF(fsGetCataloguesReply); - c = (char *) FSmalloc((unsigned) rlen + 1); + c = FSmalloc(rlen + 1); if ((!list) || (!c)) { if (list) - FSfree((char *) list); + FSfree(list); if (c) FSfree(c); _FSEatData(svr, (unsigned long) rlen); 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/libFS-1.0.4/src/FSListCats.c new/libFS-1.0.5/src/FSListCats.c --- old/libFS-1.0.4/src/FSListCats.c 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/FSListCats.c 2013-05-29 02:17:52.000000000 +0200 @@ -77,7 +77,7 @@ _FSSend(svr, pattern, nbytes); if (!_FSReply(svr, (fsReply *) & rep, (SIZEOF(fsListCataloguesReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return (char **) 0; + return (char **) NULL; if (rep.num_catalogues #if (SIZE_MAX >> 2) <= UINT_MAX @@ -85,14 +85,13 @@ && rep.length <= (SIZE_MAX>>2) #endif ) { - clist = (char **) - FSmalloc((unsigned) rep.num_catalogues * sizeof(char *)); + clist = FSmalloc(rep.num_catalogues * sizeof(char *)); rlen = (rep.length << 2) - SIZEOF(fsListCataloguesReply); - c = (char *) FSmalloc((unsigned) (rlen + 1)); + c = FSmalloc(rlen + 1); if ((!clist) || (!c)) { if (clist) - FSfree((char *) clist); + FSfree(clist); if (c) FSfree(c); _FSEatData(svr, (unsigned long) rlen); @@ -123,7 +122,7 @@ { if (list) { FSfree(list[0] - 1); - FSfree((char *) list); + FSfree(list); } return 1; } 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/libFS-1.0.4/src/FSListExt.c new/libFS-1.0.5/src/FSListExt.c --- old/libFS-1.0.4/src/FSListExt.c 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/FSListExt.c 2013-05-29 02:17:52.000000000 +0200 @@ -79,12 +79,12 @@ && rep.length <= (SIZE_MAX>>2) #endif ) { - list = (char **) FSmalloc((unsigned)(rep.nExtensions * sizeof(char *))); + list = FSmalloc(rep.nExtensions * sizeof(char *)); rlen = (rep.length << 2) - SIZEOF(fsListExtensionsReply); - c = (char *) FSmalloc((unsigned) rlen + 1); + c = FSmalloc(rlen + 1); if ((!list) || (!c)) { if (list) - FSfree((char *) list); + FSfree(list); if (c) FSfree(c); _FSEatData(svr, (unsigned long) rlen); @@ -115,7 +115,7 @@ { if (list != NULL) { FSfree(list[0] - 1); - FSfree((char *) list); + FSfree(list); } return 1; } 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/libFS-1.0.4/src/FSOpenServ.c new/libFS-1.0.5/src/FSOpenServ.c --- old/libFS-1.0.4/src/FSOpenServ.c 2011-09-29 07:19:40.000000000 +0200 +++ new/libFS-1.0.5/src/FSOpenServ.c 2013-05-29 02:17:52.000000000 +0200 @@ -80,7 +80,7 @@ if (svr->buffer) FSfree(svr->buffer); - FSfree((char *) svr); + FSfree(svr); } static @@ -111,10 +111,10 @@ char *setup = NULL; fsConnSetupAccept conn; char *auth_data = NULL; - char *alt_data = NULL, + unsigned char *alt_data = NULL, *ad; AlternateServer *alts = NULL; - int altlen; + unsigned int altlen; char *vendor_string; unsigned long setuplength; @@ -124,13 +124,12 @@ } } - if ((svr = (FSServer *) FScalloc(1, sizeof(FSServer))) == NULL) { + if ((svr = FScalloc(1, sizeof(FSServer))) == NULL) { errno = ENOMEM; return (FSServer *) NULL; } - if ((svr->server_name = FSmalloc((unsigned) (strlen(server) + 1))) - == NULL) { + if ((svr->server_name = FSmalloc(strlen(server) + 1)) == NULL) { goto fail; } (void) strcpy(svr->server_name, server); @@ -158,8 +157,8 @@ setuplength = prefix.alternate_len << 2; if (setuplength > (SIZE_MAX>>2) - || (alt_data = (char *) - (setup = FSmalloc((unsigned) setuplength))) == NULL) { + || (alt_data = (unsigned char *) + (setup = FSmalloc(setuplength))) == NULL) { goto fail; } _FSRead(svr, (char *) alt_data, setuplength); @@ -171,18 +170,17 @@ } #endif - alts = (AlternateServer *) - FSmalloc(sizeof(AlternateServer) * prefix.num_alternates); + alts = FSmalloc(sizeof(AlternateServer) * prefix.num_alternates); if (!alts) { goto fail; } for (i = 0; i < prefix.num_alternates; i++) { alts[i].subset = (Bool) *ad++; - altlen = (int) *ad++; - alts[i].name = (char *) FSmalloc(altlen + 1); + altlen = (unsigned int) *ad++; + alts[i].name = FSmalloc(altlen + 1); if (!alts[i].name) { while (--i) { - FSfree((char *) alts[i].name); + FSfree(alts[i].name); } goto fail; } @@ -190,7 +188,7 @@ alts[i].name[altlen] = '\0'; ad += altlen + ((4 - (altlen + 2)) & 3); } - FSfree((char *) alt_data); + FSfree(alt_data); alt_data = NULL; svr->alternate_servers = alts; @@ -199,7 +197,7 @@ setuplength = prefix.auth_len << 2; if (setuplength > (SIZE_MAX>>2) || (auth_data = (char *) - (setup = FSmalloc((unsigned) setuplength))) == NULL) { + (setup = FSmalloc(setuplength))) == NULL) { goto fail; } _FSRead(svr, (char *) auth_data, setuplength); @@ -212,8 +210,7 @@ /* get rest */ _FSRead(svr, (char *) &conn, (long) SIZEOF(fsConnSetupAccept)); - if ((vendor_string = (char *) - FSmalloc((unsigned) conn.vendor_len + 1)) == NULL) { + if ((vendor_string = FSmalloc(conn.vendor_len + 1)) == NULL) { goto fail; } _FSReadPad(svr, (char *) vendor_string, conn.vendor_len); @@ -263,9 +260,9 @@ return (svr); fail: /* Failure: clean up and return null */ - FSfree((char *) alts); - FSfree((char *) alt_data); - FSfree((char *) auth_data); + FSfree(alts); + FSfree(alt_data); + FSfree(auth_data); OutOfMemory(svr, setup); return (FSServer *) 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/libFS-1.0.4/src/FSQGlyphs.c new/libFS-1.0.5/src/FSQGlyphs.c --- old/libFS-1.0.4/src/FSQGlyphs.c 2012-03-03 04:42:07.000000000 +0100 +++ new/libFS-1.0.5/src/FSQGlyphs.c 2013-05-29 02:17:52.000000000 +0200 @@ -91,23 +91,23 @@ return FSBadAlloc; #endif - offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars); + offs = FSmalloc(sizeof(FSOffset) * reply.num_chars); *offsets = offs; if (!offs) return FSBadAlloc; #if (SIZE_MAX >> 2) <= UINT_MAX /* XXX This thest is incomplete */ if (reply.length > (SIZE_MAX >> 2)) { - FSfree((char *) offs); + FSfree(offs); return FSBadAlloc; } #endif left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps8Reply) - (SIZEOF(fsOffset32) * reply.num_chars); - gd = (unsigned char *) FSmalloc(left); + gd = FSmalloc(left); *glyphdata = gd; if (!gd) { - FSfree((char *) offs); + FSfree(offs); return FSBadAlloc; } for (i=0; i<reply.num_chars; i++) @@ -154,8 +154,7 @@ if (str_len > SIZE_MAX/SIZEOF(fsChar2b_version1)) return FSBadAlloc; - swapped_str = (fsChar2b_version1 *) - FSmalloc(SIZEOF(fsChar2b_version1) * str_len); + swapped_str = FSmalloc(SIZEOF(fsChar2b_version1) * str_len); if (!swapped_str) return FSBadAlloc; for (i = 0; i < str_len; i++) { @@ -177,23 +176,23 @@ if(reply.num_chars > SIZE_MAX/sizeof(FSOffset)) return FSBadAlloc; #endif - offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars); + offs = FSmalloc(sizeof(FSOffset) * reply.num_chars); *offsets = offs; if (!offs) return FSBadAlloc; #if (SIZE_MAX >> 2) <= UINT_MAX /* XXX - this test is incomplete */ if (reply.length > (SIZE_MAX>>2)) { - FSfree((char *) offs); + FSfree(offs); return FSBadAlloc; } #endif left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps16Reply) - (SIZEOF(fsOffset32) * reply.num_chars); - gd = (unsigned char *) FSmalloc(left); + gd = FSmalloc(left); *glyphdata = gd; if (!gd) { - FSfree((char *) offs); + FSfree(offs); return FSBadAlloc; } for (i=0; i<reply.num_chars; 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/libFS-1.0.4/src/FSQXExt.c new/libFS-1.0.5/src/FSQXExt.c --- old/libFS-1.0.4/src/FSQXExt.c 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/FSQXExt.c 2013-05-29 02:17:52.000000000 +0200 @@ -98,7 +98,7 @@ return FSBadAlloc; #endif - ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); + ext = FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); *extents = ext; if (!ext) return FSBadAlloc; @@ -135,8 +135,7 @@ { fsChar2b_version1 *swapped_str; - swapped_str = (fsChar2b_version1 *) - FSmalloc(SIZEOF(fsChar2b_version1) * str_len); + swapped_str = FSmalloc(SIZEOF(fsChar2b_version1) * str_len); if (!swapped_str) return FSBadAlloc; for (i = 0; i < str_len; i++) { @@ -159,7 +158,7 @@ return FSBadAlloc; #endif - ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); + ext = FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); *extents = ext; if (!ext) return FSBadAlloc; 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/libFS-1.0.4/src/FSQXInfo.c new/libFS-1.0.5/src/FSQXInfo.c --- old/libFS-1.0.4/src/FSQXInfo.c 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/FSQXInfo.c 2013-05-29 02:17:52.000000000 +0200 @@ -98,13 +98,12 @@ #endif /* prepare for prop data */ - offset_data = (FSPropOffset *) - FSmalloc(props->num_offsets * sizeof(FSPropOffset)); + offset_data = FSmalloc(props->num_offsets * sizeof(FSPropOffset)); if (!offset_data) return FSBadAlloc; - pdata = (unsigned char *) FSmalloc(props->data_len); + pdata = FSmalloc(props->data_len); if (!pdata) { - FSfree((char *) offset_data); + FSfree(offset_data); return FSBadAlloc; } /* get offsets */ 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/libFS-1.0.4/src/FSlibInt.c new/libFS-1.0.5/src/FSlibInt.c --- old/libFS-1.0.4/src/FSlibInt.c 2011-12-04 17:52:26.000000000 +0100 +++ new/libFS-1.0.5/src/FSlibInt.c 2013-05-29 02:17:52.000000000 +0200 @@ -748,7 +748,8 @@ unsigned long serial; long err_data; - err = *(fsError *) rep; + /* copy in the part we already read off the wire */ + memcpy(&err, rep, SIZEOF(fsReply)); /* read the rest of the error */ _FSRead(svr, (char *) &err + SIZEOF(fsReply), (long) (SIZEOF(fsError) - SIZEOF(fsReply))); @@ -846,8 +847,7 @@ if ((qelt = _FSqfree) != NULL) { /* If _FSqfree is non-NULL do this, else malloc a new one. */ _FSqfree = qelt->next; - } else if ((qelt = - (_FSQEvent *) FSmalloc((unsigned) sizeof(_FSQEvent))) == NULL) { + } else if ((qelt = FSmalloc(sizeof(_FSQEvent))) == NULL) { /* Malloc call failed! */ ESET(ENOMEM); (*_FSIOErrorFunction) (svr); @@ -1105,7 +1105,7 @@ if (svr->scratch_buffer != NULL) FSfree(svr->scratch_buffer); return (svr->scratch_length = nbytes, - svr->scratch_buffer = FSmalloc((unsigned) nbytes)); + svr->scratch_buffer = FSmalloc(nbytes)); } return (svr->scratch_buffer); } @@ -1194,7 +1194,7 @@ } void -Data16(svr, data, len) +Data16( FSServer *svr, short *data, unsigned 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/libFS-1.0.4/src/Makefile.am new/libFS-1.0.5/src/Makefile.am --- old/libFS-1.0.4/src/Makefile.am 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/src/Makefile.am 2013-05-29 02:17:52.000000000 +0200 @@ -36,9 +36,9 @@ -DFS_t \ -DTRANS_CLIENT -libFS_la_LIBADD = $(FS_LIBS) +AM_CPPFLAGS = -I$(top_srcdir)/include/X11/fonts -INCLUDES = -I$(top_srcdir)/include/X11/fonts +libFS_la_LIBADD = $(FS_LIBS) libFS_la_LDFLAGS = -export-symbols-regex '^FS.*' -version-number 6:0:0 -no-undefined 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/libFS-1.0.4/test/Makefile.am new/libFS-1.0.5/test/Makefile.am --- old/libFS-1.0.4/test/Makefile.am 2011-09-17 07:07:37.000000000 +0200 +++ new/libFS-1.0.5/test/Makefile.am 2013-05-29 02:17:52.000000000 +0200 @@ -24,7 +24,7 @@ noinst_PROGRAMS = FSGetErrorText AM_CFLAGS = $(CWARNFLAGS) $(FS_CFLAGS) -INCLUDES = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include FSGetErrorText_SOURCES = FSGetErrorText.c FSGetErrorText_LDADD = ../src/libFS.la -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
