babl r293 - in trunk: . babl
- From: muks svn gnome org
- To: svn-commits-list gnome org
- Subject: babl r293 - in trunk: . babl
- Date: Sun, 16 Mar 2008 12:18:25 +0000 (GMT)
Author: muks
Date: Sun Mar 16 12:18:25 2008
New Revision: 293
URL: http://svn.gnome.org/viewvc/babl?rev=293&view=rev
Log:
2008-03-16 Mukund Sivaraman <muks mukund org>
* babl/babl-extension.c: getenv() can return NULL.
* babl/babl-memory.c: Check for NULL in babl_strcat().
Modified:
trunk/ChangeLog
trunk/babl/babl-extension.c
trunk/babl/babl-memory.c
Modified: trunk/babl/babl-extension.c
==============================================================================
--- trunk/babl/babl-extension.c (original)
+++ trunk/babl/babl-extension.c Sun Mar 16 12:18:25 2008
@@ -272,10 +272,13 @@
while (*src)
{
+ char *home;
switch (*src)
{
case '~':
- dst = babl_strcat (dst, getenv ("HOME"));
+ home = getenv ("HOME");
+ if (NULL != home)
+ dst = babl_strcat (dst, home);
break;
default:
Modified: trunk/babl/babl-memory.c
==============================================================================
--- trunk/babl/babl-memory.c (original)
+++ trunk/babl/babl-memory.c Sun Mar 16 12:18:25 2008
@@ -298,6 +298,9 @@
int src_len;
int dst_len;
+ if (NULL == src)
+ return dest;
+
src_len = strlen (src);
if (!dest)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]