public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix uninitialized vars in ld-collate.c
@ 2006-09-06 16:41 Jakub Jelinek
  2006-09-06 16:52 ` Ulrich Drepper
  2006-09-06 16:53 ` Ulrich Drepper
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Jelinek @ 2006-09-06 16:41 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

col_sym_free label is in a different block and frees what local variables
in that block point to, guess that's a typo.
seqp was declared in 2 different blocks and one was in some cases using
goto to jump to the other block.

2006-09-06  Jakub Jelinek  <jakub@redhat.com>

	* locale/programs/ld-collate.c (collate_read): Goto sym_equiv_free rather than
	col_sym_free.  Move seqp declaration earlier.

--- libc/locale/programs/ld-collate.c.jj	2006-08-30 17:20:41.000000000 +0200
+++ libc/locale/programs/ld-collate.c	2006-09-06 18:33:31.000000000 +0200
@@ -3068,7 +3068,7 @@ collate_read (struct linereader *ldfile,
 		  lr_error (ldfile, _("\
 %s: unknown symbol `%s' in equivalent definition"),
 			    "LC_COLLATE", symname);
-		  goto col_sym_free;
+		  goto sym_equiv_free;
 		}
 
 	      if (insert_entry (&collate->sym_table,
@@ -3533,13 +3533,13 @@ error while adding equivalent collating 
 	      break;
 	    }
 
+	  struct element_t *seqp;
 	  if (state == 0)
 	    {
 	      /* We are outside an `order_start' region.  This means
                  we must only accept definitions of values for
                  collation symbols since these are purely abstract
                  values and don't need directions associated.  */
-	      struct element_t *seqp;
 	      void *ptr;
 
 	      if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0)
@@ -3586,7 +3586,6 @@ error while adding equivalent collating 
 	    {
 	      /* It is possible that we already have this collation sequence.
 		 In this case we move the entry.  */
-	      struct element_t *seqp = NULL;
 	      void *sym;
 	      void *ptr;
 

	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix uninitialized vars in ld-collate.c
  2006-09-06 16:41 [PATCH] Fix uninitialized vars in ld-collate.c Jakub Jelinek
@ 2006-09-06 16:52 ` Ulrich Drepper
  2006-09-06 16:53 ` Ulrich Drepper
  1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Drepper @ 2006-09-06 16:52 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

Applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix uninitialized vars in ld-collate.c
  2006-09-06 16:41 [PATCH] Fix uninitialized vars in ld-collate.c Jakub Jelinek
  2006-09-06 16:52 ` Ulrich Drepper
@ 2006-09-06 16:53 ` Ulrich Drepper
  1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Drepper @ 2006-09-06 16:53 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

Applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-06 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-06 16:41 [PATCH] Fix uninitialized vars in ld-collate.c Jakub Jelinek
2006-09-06 16:52 ` Ulrich Drepper
2006-09-06 16:53 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).