sas             Tue Apr 17 15:44:54 2001 EDT

  Modified files:              
    /php4/ext/ircg      ircg.c 
  Log:
  Allocate memory for js escaped strings using the C library's malloc.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.58 php4/ext/ircg/ircg.c:1.59
--- php4/ext/ircg/ircg.c:1.58   Sun Apr 15 17:24:14 2001
+++ php4/ext/ircg/ircg.c        Tue Apr 17 15:44:54 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: ircg.c,v 1.58 2001/04/16 00:24:14 sas Exp $ */
+/* $Id: ircg.c,v 1.59 2001/04/17 22:44:54 sas Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -209,10 +209,10 @@
                case '"':
                case '\\':
                case '\'':
-                       smart_str_appendc(output, '\\');
+                       smart_str_appendc_ex(output, '\\', 1);
                        /* fall-through */
                default:
-                       smart_str_appendc(output, *p);
+                       smart_str_appendc_ex(output, *p, 1);
                }
        }
 }
@@ -250,7 +250,7 @@
                        smart_str tmp = {0}; \
                        ircg_js_escape(what, &tmp); \
                        smart_str_append_ex(result, &tmp, 1); \
-                       smart_str_free(&tmp); \
+                       smart_str_free_ex(&tmp, 1); \
                } else { \
                        smart_str_append_ex(result, what, 1); \
                }
@@ -315,7 +315,7 @@
        if (encoded)
                smart_str_free(&encoded_msg);
        if (js_encoded)
-               smart_str_free(&js_encoded_msg);
+               smart_str_free_ex(&js_encoded_msg, 1);
 
        smart_str_0(result);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to