Hello community, here is the log from the commit of package librtas checked in at Fri Oct 13 21:44:36 CEST 2006. -------- --- arch/ppc/librtas/librtas.changes 2006-01-27 13:58:29.000000000 +0100 +++ /mounts/work_src_done/STABLE/librtas/librtas.changes 2006-10-13 17:23:39.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Oct 13 17:23:32 CEST 2006 - olh@suse.de + +- fix off by one in open_prop_file + +------------------------------------------------------------------- Old: ---- get_release_number.sh New: ---- librtas.open_prop_file-off_by_one.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ librtas.spec ++++++ --- /var/tmp/diff_new_pack.CB9o77/_old 2006-10-13 21:43:52.000000000 +0200 +++ /var/tmp/diff_new_pack.CB9o77/_new 2006-10-13 21:43:52.000000000 +0200 @@ -13,7 +13,7 @@ Name: librtas BuildRequires: doxygen Version: 1.2.4 -Release: 200610091656 +Release: 200610091709 Group: System/Libraries License: IBM Public License, Other License(s), see package Summary: Libraries to provide access to RTAS calls and RTAS events. @@ -23,6 +23,7 @@ Source0: http://librtas.ozlabs.org/downloads/librtas-src-%{version}.tar.gz Patch0: librtas.signed-char.patch Patch1: librtas.syscall.patch +Patch2: librtas.open_prop_file-off_by_one.patch %description The librtas shared library provides userspace with an interface through @@ -46,6 +47,7 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build make CFLAGS="$RPM_OPT_FLAGS -fPIC -g" LIBDIR="%{_libdir}" %{?jobs:-j%jobs} @@ -70,6 +72,8 @@ %attr (555,root,root)%{_libdir}/lib* %changelog -n librtas +* Fri Oct 13 2006 - olh@suse.de +- fix off by one in open_prop_file * Fri Jan 27 2006 - olh@suse.de - package soname symlink * Wed Jan 25 2006 - mls@suse.de ++++++ librtas.open_prop_file-off_by_one.patch ++++++ alloc the trailing nul as well. --- librtas_src/ofdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: librtas-1.2.4/librtas_src/ofdt.c =================================================================== --- librtas-1.2.4.orig/librtas_src/ofdt.c +++ librtas-1.2.4/librtas_src/ofdt.c @@ -31,14 +31,14 @@ static int open_prop_file(const char *pr char *path; int len; - len = strlen(prop_path) + strlen(prop_name) + 1; + len = strlen(prop_path) + strlen(prop_name) + 1 + 1; path = malloc(len); if (path == NULL) { errno = ENOMEM; return -1; } - sprintf(path, "%s/%s", prop_path, prop_name); + snprintf(path, len, "%s/%s", prop_path, prop_name); *fd = open(path, O_RDONLY); free(path); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org