You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2007/09/01 01:57:41 UTC
svn commit: r571651 - /apr/apr/branches/1.2.x/test/testuser.c
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));