OSSP CVS Repository

ossp - Check-in [1363]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1363
Date: 2001-Nov-19 16:15:31 (local)
2001-Nov-19 15:15:31 (UTC)
User:simons
Branch:
Comment: Added early initialization of the "result" pointer so that we never leave it unitialized when var_expand() failes.
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.21 -> 1.22     4 inserted, 0 deleted

ossp-pkg/var/var.c 1.21 -> 1.22

--- var.c        2001/11/19 14:10:48     1.21
+++ var.c        2001/11/19 15:15:31     1.22
@@ -1578,6 +1578,10 @@
     if (config == NULL)
         config = &var_config_default;
 
+    /* Set the result pointer to the begining of the input buffer so
+       that it is correctly initialized in case we fail with an error. */
+    *result = (char *)input_buf;
+
     /* Expand the class description for valid variable names. */
     if ((rc = expand_character_class(config->namechars, nameclass)) != VAR_OK)
         return rc;

CVSTrac 2.0.1