apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r571651 - /apr/apr/branches/1.2.x/test/testuser.c
Date Fri, 31 Aug 2007 23:57:41 GMT
Author: bojan
Date: Fri Aug 31 16:57:40 2007
New Revision: 571651

URL: http://svn.apache.org/viewvc?rev=571651&view=rev
Log:
Fix segfaults in testuser

Modified:
    apr/apr/branches/1.2.x/test/testuser.c

Modified: apr/apr/branches/1.2.x/test/testuser.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testuser.c?rev=571651&r1=571650&r2=571651&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testuser.c (original)
+++ apr/apr/branches/1.2.x/test/testuser.c Fri Aug 31 16:57:40 2007
@@ -44,6 +44,9 @@
                        apr_uid_name_get(&uname, uid, p));
     ABTS_PTR_NOTNULL(tc, uname);
 
+    if (uname == NULL)
+        return;
+
     APR_ASSERT_SUCCESS(tc, "apr_uid_get failed",
                        apr_uid_get(&retreived_uid, &retreived_gid, uname, p));
 
@@ -86,6 +89,9 @@
     APR_ASSERT_SUCCESS(tc, "apr_gid_name_get failed",
                        apr_gid_name_get(&gname, gid, p));
     ABTS_PTR_NOTNULL(tc, gname);
+
+    if (gname == NULL)
+        return;
 
     APR_ASSERT_SUCCESS(tc, "apr_gid_get failed",
                        apr_gid_get(&retreived_gid, gname, p));



Mime
View raw message