[Parted-commits] GNU Parted Official Repository: Changes to 'master'
Jim Meyering
meyering at alioth.debian.org
Sat Jul 11 20:23:44 UTC 2009
parted/strlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 1ae256940a86fa000cf768b5fd2dddd7cf6026b2
Author: Jim Meyering <meyering at redhat.com>
Date: Fri Jun 26 17:25:16 2009 +0200
ui: avoid NULL dereference on realloc failure
* parted/strlist.c (gettext_to_wchar) [ENABLE_NLS]: Use xrealloc,
so we never return NULL, which could then be dereferenced.
diff --git a/parted/strlist.c b/parted/strlist.c
index d71e876..cc4b65c 100644
--- a/parted/strlist.c
+++ b/parted/strlist.c
@@ -1,6 +1,6 @@
/*
parted - a frontend to libparted
- Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
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
@@ -123,7 +123,7 @@ gettext_to_wchar (const char* str)
if (status == (size_t) -1)
goto error;
- result = realloc (result, (wcslen (result) + 1) * sizeof (wchar_t));
+ result = xrealloc (result, (wcslen (result) + 1) * sizeof (wchar_t));
return result;
error:
More information about the Parted-commits
mailing list