[Fedora-directory-commits] mod_nss nss_engine_vars.c,1.10,1.11

Robert Crittenden (rcritten) fedora-directory-commits at redhat.com
Thu Jan 3 21:35:31 UTC 2008


Author: rcritten

Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2854

Modified Files:
	nss_engine_vars.c 
Log Message:
Resolves BZ 248722

See if the certificate has a version before trying to decode it into a
CGI variable.



Index: nss_engine_vars.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- nss_engine_vars.c	18 Oct 2007 18:26:21 -0000	1.10
+++ nss_engine_vars.c	3 Jan 2008 21:35:28 -0000	1.11
@@ -336,8 +336,13 @@
     resdup = TRUE;
 
     if (strcEQ(var, "M_VERSION")) {
-        result = apr_psprintf(p, "%lu", DER_GetInteger(&xs->version)+1);
-        resdup = FALSE;
+        if (xs->version.data != NULL) {
+            result = apr_psprintf(p, "%lu", DER_GetInteger(&xs->version)+1);
+            resdup = FALSE;
+        } else {
+            result = apr_pstrdup(p, "UNKNOWN");
+            resdup = FALSE;
+        }
     }
     else if (strcEQ(var, "M_SERIAL")) {
         result = apr_psprintf(p, "%lu", DER_GetInteger(&xs->serialNumber));




More information about the Fedora-directory-commits mailing list