Hello community,
here is the log from the commit of package rarian for openSUSE:Factory
checked in at Fri Jan 14 16:51:16 CET 2011.
--------
--- GNOME/rarian/rarian.changes 2009-12-07 13:47:02.000000000 +0100
+++ rarian/rarian.changes 2011-01-11 19:38:38.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Jan 11 19:31:09 CET 2011 - hpj@novell.com
+
+- Update rarian-0.5.6-reg-parse-bugs.patch and
+ rarian-opensuse-manuals.patch to correctly handle very long lines
+ of input text and prevent crashes.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rarian.spec ++++++
--- /var/tmp/diff_new_pack.PovzHZ/_old 2011-01-14 16:50:27.000000000 +0100
+++ /var/tmp/diff_new_pack.PovzHZ/_new 2011-01-14 16:50:27.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package rarian (Version 0.8.1)
+# spec file for package rarian
#
-# 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
@@ -28,7 +28,7 @@
BuildRequires: sgml-skel
Summary: Rarian is designed to be a replacement for scrollkeeper
Version: 0.8.1
-Release: 8
+Release: 15
Source0: %{name}-%{version}.tar.bz2
Patch1: rarian-0.5.6-reg-parse-bugs.patch
Patch2: rarian-0.7.1-return.patch
++++++ rarian-0.5.6-reg-parse-bugs.patch ++++++
--- /var/tmp/diff_new_pack.PovzHZ/_old 2011-01-14 16:50:27.000000000 +0100
+++ /var/tmp/diff_new_pack.PovzHZ/_new 2011-01-14 16:50:27.000000000 +0100
@@ -1,6 +1,14 @@
---- rarian-0.6.0/librarian/rarian-reg-utils.c
-+++ rarian-0.6.0/librarian/rarian-reg-utils.c
-@@ -89,6 +89,10 @@
+commit 1a0d8473548e06309e17d6fe1143e384045dd6ad
+Author: Hans Petter Jansson
+Date: Tue Jan 11 17:49:58 2011 +0100
+
+ Patch 1: rarian-0.5.6-reg-parse-bugs.patch
+
+diff --git a/librarian/rarian-reg-utils.c b/librarian/rarian-reg-utils.c
+index aec298f..ac2713f 100644
+--- a/librarian/rarian-reg-utils.c
++++ b/librarian/rarian-reg-utils.c
+@@ -93,6 +93,10 @@ rrn_reg_parse_file (char *filename)
}
file = fopen (filename, "r");
@@ -11,14 +19,49 @@
buf = malloc (sizeof (char) * 1024);
while (fgets (buf, 1023, file)) {
-@@ -607,13 +614,18 @@
+@@ -100,9 +104,15 @@ rrn_reg_parse_file (char *filename)
+ while (buf[strlen(buf)-1] != '\n') {
char *tmp;
char *result = NULL;
- tmp = strdup (buf);
+- tmp = strdup (buf);
++ int len;
++
++ len = strlen (buf);
++ tmp = malloc (len >= 1024 ? len + 1 : 1024);
++ memcpy (tmp, buf, len + 1);
++
+ if (fgets (buf, 1023, file)) {
+- result = malloc (sizeof (char) * (strlen(tmp)+strlen(buf)+2));
++ len += strlen (buf);
++ result = malloc (sizeof (char) * (len >= 1023 ? len + 2 : 1024));
+ strcpy (result, tmp);
+ strcat (result, buf);
+ free (tmp);
+@@ -611,6 +621,8 @@ rrn_sect_parse_file (char *filename)
+ }
+
+ file = fopen (filename, "r");
++ if (!file)
++ return NULL;
+
+ buf = malloc (sizeof (char) * 1024);
+ while (fgets (buf, 1023, file)) {
+@@ -618,14 +630,25 @@ rrn_sect_parse_file (char *filename)
+ while (buf[strlen(buf)-1] != '\n') {
+ char *tmp;
+ char *result = NULL;
+- tmp = strdup (buf);
- buf = fgets (buf, 1023, file);
- result = malloc (sizeof (char) * (strlen(tmp)+strlen(buf)+2));
++ int len;
++
++ len = strlen (buf);
++ tmp = malloc (len >= 1024 ? len + 1 : 1024);
++ memcpy (tmp, buf, len + 1);
++
+ if (fgets (buf, 1023, file)) {
-+ result = malloc (sizeof (char) * 2048);
++ len += strlen (buf);
++ result = malloc (sizeof (char) * (len >= 1023 ? len + 2 : 1024));
strcpy (result, tmp);
strcat (result, buf);
free (tmp);
@@ -27,7 +70,7 @@
+ buf = result;
+ } else {
+ free (buf);
-+ buf = realloc (tmp, sizeof (char) * 1024);
++ buf = tmp;
+ break;
+ }
}
++++++ rarian-opensuse-manuals.patch ++++++
--- /var/tmp/diff_new_pack.PovzHZ/_old 2011-01-14 16:50:27.000000000 +0100
+++ /var/tmp/diff_new_pack.PovzHZ/_new 2011-01-14 16:50:27.000000000 +0100
@@ -1,8 +1,14 @@
-Index: rarian-0.8.1/librarian/rarian-main.c
-===================================================================
---- rarian-0.8.1.orig/librarian/rarian-main.c
-+++ rarian-0.8.1/librarian/rarian-main.c
-@@ -76,6 +76,7 @@ static void process_locale_dirs (char *
+commit 476e44b5a13bd5d410124874416b5ca40e08b97c
+Author: Hans Petter Jansson
+Date: Tue Jan 11 17:49:58 2011 +0100
+
+ Patch 4: rarian-opensuse-manuals.patch
+
+diff --git a/librarian/rarian-main.c b/librarian/rarian-main.c
+index 044055f..f46dbe1 100644
+--- a/librarian/rarian-main.c
++++ b/librarian/rarian-main.c
+@@ -76,6 +76,7 @@ static void process_locale_dirs (char * dir);
#if ENABLE_OMF_READ
static void process_omf_dir (char *dir);
#endif
@@ -110,11 +116,11 @@
+
+ insert_orphans ();
+}
-Index: rarian-0.8.1/librarian/rarian-reg-utils.c
-===================================================================
---- rarian-0.8.1.orig/librarian/rarian-reg-utils.c
-+++ rarian-0.8.1/librarian/rarian-reg-utils.c
-@@ -37,6 +37,7 @@ static void process_sect_pair (RrnSe
+diff --git a/librarian/rarian-reg-utils.c b/librarian/rarian-reg-utils.c
+index bac3ccb..9e8bfc5 100644
+--- a/librarian/rarian-reg-utils.c
++++ b/librarian/rarian-reg-utils.c
+@@ -37,6 +37,7 @@ static void process_sect_pair (RrnSect *sect, char *key, char *value);
static int rrn_reg_add_sect (RrnReg *reg, RrnSect *sect);
static void process_path (RrnReg *reg);
static void process_section_path (char *owner_path, RrnSect *section);
@@ -122,7 +128,7 @@
RrnReg *
-@@ -65,6 +66,120 @@ rrn_reg_new ()
+@@ -65,6 +66,126 @@ rrn_reg_new ()
}
RrnReg *
@@ -163,9 +169,15 @@
+ while (buf[strlen(buf)-1] != '\n') {
+ char *tmp;
+ char *result = NULL;
-+ tmp = strdup (buf);
++ int len;
++
++ len = strlen (buf);
++ tmp = malloc (len >= 1024 ? len + 1 : 1024);
++ memcpy (tmp, buf, len + 1);
++
+ if (fgets (buf, 1023, file)) {
-+ result = malloc (sizeof (char) * (strlen(tmp)+strlen(buf)+2));
++ len += strlen (buf);
++ result = malloc (sizeof (char) * (len >= 1023 ? len + 2 : 1024));
+ strcpy (result, tmp);
+ strcat (result, buf);
+ free (tmp);
@@ -243,7 +255,7 @@
rrn_reg_parse_file (char *filename)
{
RrnReg *reg = NULL;
-@@ -384,6 +499,12 @@ process_pair (RrnReg *reg, char *key, ch
+@@ -384,6 +505,12 @@ process_pair (RrnReg *reg, char *key, char *value)
reg->default_section = strdup (value);
} else if (!strcmp (key, "Icon")) {
reg->icon = strdup (value);
@@ -256,10 +268,10 @@
} else {
fprintf (stderr, "WARNING: Unknown element %s: %s\n", key, value);
}
-Index: rarian-0.8.1/librarian/rarian-reg-utils.h
-===================================================================
---- rarian-0.8.1.orig/librarian/rarian-reg-utils.h
-+++ rarian-0.8.1/librarian/rarian-reg-utils.h
+diff --git a/librarian/rarian-reg-utils.h b/librarian/rarian-reg-utils.h
+index ffc3caa..575dd82 100644
+--- a/librarian/rarian-reg-utils.h
++++ b/librarian/rarian-reg-utils.h
@@ -73,6 +73,7 @@ RrnSect * rrn_sect_new ();
RrnReg * rrn_reg_parse_file (char *filename);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org