Hello community, here is the log from the commit of package loki_setup checked in at Tue Dec 12 23:06:36 CET 2006. -------- --- loki_setup/loki_setup.changes 2006-11-07 13:38:07.000000000 +0100 +++ /mounts/work_src_done/STABLE/loki_setup/loki_setup.changes 2006-12-12 11:45:20.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Dec 12 11:45:10 CET 2006 - lnussel@suse.de + +- fix some wrong uses of strncat() + +------------------------------------------------------------------- New: ---- loki_setupdb-strncat.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ loki_setup.spec ++++++ --- /var/tmp/diff_new_pack.T4uUwG/_old 2006-12-12 23:06:08.000000000 +0100 +++ /var/tmp/diff_new_pack.T4uUwG/_new 2006-12-12 23:06:08.000000000 +0100 @@ -13,11 +13,11 @@ Name: loki_setup BuildRequires: gpm gtk1-compat-devel gtk2-devel libglade2-devel pkgconfig python python-xml update-desktop-files xdelta %define do_brandelf 1 -License: GNU General Public License (GPL) - all versions +License: GNU General Public License (GPL) URL: http://icculus.org/loki_setup/ Group: Development/Tools/Other Version: 1.6.5_20060530 -Release: 20 +Release: 27 Summary: Installer Program Mainly for Games BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: loki_setup-current.tar.bz2 @@ -46,6 +46,7 @@ # setupdb Patch20: loki_setupdb-signed-char.diff Patch21: loki_setupdb-Makefile.diff +Patch22: loki_setupdb-strncat.diff # update Patch41: loki_update-adig.diff Patch42: loki_update-snarf.diff @@ -69,7 +70,7 @@ %package -n loki_uninstall Version: 1.0.3_20051201 -Release: 33 +Release: 40 Summary: Uninstall program for games Group: Amusements/Games/Other @@ -86,7 +87,7 @@ %package -n loki_update Version: 1.0.13_20040208 -Release: 68 +Release: 75 Summary: Updater program for games Group: Amusements/Games/Other @@ -106,7 +107,7 @@ { test -d patches || mkdir patches patch=$1; shift; - quilt import "$@" -n ${patch##*/} "$patch" + quilt import "$@" -P ${patch##*/} "$patch" } qpush() { @@ -146,6 +147,7 @@ cd loki_setupdb qpatch %{PATCH20} qpatch %{PATCH21} +qpatch %{PATCH22} qpush cd .. # @@ -401,6 +403,8 @@ %{_datadir}/loki_patch %changelog -n loki_setup +* Tue Dec 12 2006 - lnussel@suse.de +- fix some wrong uses of strncat() * Tue Nov 07 2006 - ro@suse.de - fix text file permissions (products.txt) * Thu Jun 08 2006 - lnussel@suse.de ++++++ loki_setupdb-strncat.diff ++++++ Index: loki_setupdb/convert.c =================================================================== --- loki_setupdb.orig/convert.c +++ loki_setupdb/convert.c @@ -36,8 +36,8 @@ const char *get_path(const char *path) strncpy(buf, path, sizeof(buf)); } else { getcwd(buf, sizeof(buf)); - strncat(buf, "/", sizeof(buf)); - strncat(buf, path, sizeof(buf)); + strncat(buf, "/", sizeof(buf)-strlen(buf)-1); + strncat(buf, path, sizeof(buf)-strlen(buf)-1); } ptr = strrchr(buf, '/'); if ( ptr ) { Index: loki_setupdb/setupdb.c =================================================================== --- loki_setupdb.orig/setupdb.c +++ loki_setupdb/setupdb.c @@ -646,11 +646,11 @@ product_t *loki_create_product(const cha snprintf(homefile, sizeof(homefile), "%s/" LOKI_DIRNAME, detect_home()); mkdir(homefile, 0700); - strncat(homefile, "/installed", sizeof(homefile)-strlen(homefile)); + strncat(homefile, "/installed", sizeof(homefile)-strlen(homefile)-1); mkdir(homefile, 0700); - strncat(homefile, "/", sizeof(homefile)-strlen(homefile)); - strncat(homefile, get_xml_base(), sizeof(homefile)-strlen(homefile)); + strncat(homefile, "/", sizeof(homefile)-strlen(homefile)-1); + strncat(homefile, get_xml_base(), sizeof(homefile)-strlen(homefile)-1); mkdir(homefile, 0700); /* Clean up the root - it can't have a trailing slash */ @@ -667,13 +667,13 @@ product_t *loki_create_product(const cha return NULL; } - strncat(homefile, "/", sizeof(homefile)-strlen(homefile)); - strncat(homefile, name, sizeof(homefile)-strlen(homefile)); - strncat(homefile, ".xml", sizeof(homefile)-strlen(homefile)); - - strncat(manifest, "/", sizeof(manifest)-strlen(manifest)); - strncat(manifest, name, sizeof(manifest)-strlen(manifest)); - strncat(manifest, ".xml", sizeof(manifest)-strlen(manifest)); + strncat(homefile, "/", sizeof(homefile)-strlen(homefile)-1); + strncat(homefile, name, sizeof(homefile)-strlen(homefile)-1); + strncat(homefile, ".xml", sizeof(homefile)-strlen(homefile)-1); + + strncat(manifest, "/", sizeof(manifest)-strlen(manifest)-1); + strncat(manifest, name, sizeof(manifest)-strlen(manifest)-1); + strncat(manifest, ".xml", sizeof(manifest)-strlen(manifest)-1); /* Symlink the file in the 'installed' per-user directory */ @@ -2258,15 +2258,15 @@ int loki_upgrade_uninstall(product_t *pr snprintf(binpath, sizeof(binpath), "%s/" LOKI_DIRNAME "/installed/bin", detect_home()); mkdir(binpath, 0755); - strncat(binpath, "/", sizeof(binpath)); - strncat(binpath, os_name, sizeof(binpath)); + strncat(binpath, "/", sizeof(binpath)-strlen(binpath)-1); + strncat(binpath, os_name, sizeof(binpath)-strlen(binpath)-1); mkdir(binpath, 0755); - strncat(binpath, "/", sizeof(binpath)); - strncat(binpath, detect_arch(), sizeof(binpath)); + strncat(binpath, "/", sizeof(binpath)-strlen(binpath)-1); + strncat(binpath, detect_arch(), sizeof(binpath)-strlen(binpath)-1); mkdir(binpath, 0755); - strncat(binpath, "/uninstall", sizeof(binpath)); + strncat(binpath, "/uninstall", sizeof(binpath)-strlen(binpath)-1); if ( !access(binpath, X_OK) && !access(src_bins, R_OK) ) { char cmd[PATH_MAX]; @@ -2369,7 +2369,7 @@ int loki_upgrade_uninstall(product_t *pr lang); mkdir(binpath, 0755); - strncat(binpath, "/LC_MESSAGES", sizeof(binpath)); + strncat(binpath, "/LC_MESSAGES", sizeof(binpath)-strlen(binpath)-1); mkdir(binpath, 0755); snprintf(binpath, sizeof(binpath), ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de