]> granicus.if.org Git - php/commitdiff
- Fixed fatal error
authorTal Peer <tal@php.net>
Thu, 26 Sep 2002 12:58:31 +0000 (12:58 +0000)
committerTal Peer <tal@php.net>
Thu, 26 Sep 2002 12:58:31 +0000 (12:58 +0000)
ext/fribidi/fribidi.c

index fa03da8fa1459a07730d3a115fda159256f4711b..3e97a1a43e57da6a73f09bcf33331c6ae74e3149 100755 (executable)
@@ -159,12 +159,13 @@ PHP_FUNCTION(fribidi_log2vis)
        }
 
        /* allocate space and prepare all local variables */
+       len = Z_STRLEN_PP(logical_str);
        in_string = estrndup(Z_STRVAL_PP(logical_str), len);
        alloc_len = len+1;
 
        u_logical_str = (FriBidiChar*) emalloc(sizeof(FriBidiChar)*alloc_len);
        u_visual_str = (FriBidiChar*) emalloc(sizeof(FriBidiChar)*alloc_len);
-       
+
        position_L_to_V_list =  (FriBidiStrIndex *) emalloc(sizeof(FriBidiStrIndex)*alloc_len);
        position_V_to_L_list =  (FriBidiStrIndex *) emalloc(sizeof(FriBidiStrIndex)*alloc_len);
        embedding_level_list = (FriBidiLevel *) emalloc(sizeof(FriBidiLevel)*alloc_len);