Index: src/sys/psString.c
===================================================================
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/src/sys/psString.c,v
retrieving revision 1.23
diff -u -r1.23 psString.c
--- src/sys/psString.c	27 Jan 2006 01:49:05 -0000	1.23
+++ src/sys/psString.c	31 Jan 2006 00:53:21 -0000
@@ -33,7 +33,8 @@
     // Allocate memory using psAlloc function
     // Copy input string to memory just allocated
     // Return the copy
-    return strcpy(psAlloc(strlen(string) + 1), string);
+    // Pass through NULL values
+    return string ? strcpy(psAlloc(strlen(string) + 1), string) : NULL;
 }
 
 psString psStringNCopy(const char *string,
@@ -52,7 +53,10 @@
     // Allocate memory using psAlloc function - nChar bytes
     // Copy input string to memory allocated up to nChar characters
     // Return the copy
-    returnValue = strncpy(psAlloc((size_t) nChar + 1), string, (size_t) nChar);
+    // Pass through NULL values
+    returnValue =
+         string ? strncpy(psAlloc((size_t) nChar + 1), string, (size_t) nChar)
+                : NULL;
 
     // Ensure the last byte is NULL character
     returnValue[nChar] = '\0';
Index: src/sys/psString.h
===================================================================
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/src/sys/psString.h,v
retrieving revision 1.17
diff -u -r1.17 psString.h
--- src/sys/psString.h	26 Jan 2006 05:31:54 -0000	1.17
+++ src/sys/psString.h	31 Jan 2006 00:53:21 -0000
@@ -37,8 +37,9 @@
 
 /** Copies the input string
  *
- *  This function shall allocate memory to the length of the input string
- *  plus one and copy the input string to the newly allocated memory.
+ *  This function shall allocate memory to the length of the input string plus
+ *  one and copy the input string to the newly allocated memory.  If 'string'
+ *  is 'NULL' then 'NULL' is returned.
  *
  *  @return psString:      Copy of input string
  */
@@ -54,7 +55,7 @@
  *  so if the input string is larger than nChar characters the copied
  *  string will be a substring of the input string.  If the input string
  *  is smaller than nChar bytes then the remaining bytes allocated will
- *  be set to NULL.
+ *  be set to NULL.  If 'string' is 'NULL' then 'NULL' is returned.
  *
  *  @return  psString:   Copy of input string
  */
Index: src/types/psMetadata.c
===================================================================
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/src/types/psMetadata.c,v
retrieving revision 1.96
diff -u -r1.96 psMetadata.c
--- src/types/psMetadata.c	26 Jan 2006 00:46:54 -0000	1.96
+++ src/types/psMetadata.c	31 Jan 2006 00:53:21 -0000
@@ -243,7 +243,12 @@
         break;
     case PS_DATA_STRING:
         // Perform copy of input strings
-        metadataItem->data.V = psStringNCopy(va_arg(argPtr, char *), MAX_STRING_LENGTH);
+        {
+            char *string = va_arg(argPtr, char *);
+            metadataItem->data.V =
+                          string ? psStringNCopy(string, MAX_STRING_LENGTH)
+                                 : NULL;
+        }
         break;
     case     PS_DATA_ARRAY:                     // psArray
     case     PS_DATA_BITSET:                    // psBitSet
