Attached :)

On Wed, 08 Sep 2010, John Khvatov wrote:

> Hello all!
> 
> I've attached patch, that fixes a form_result() function. This function
> does not work if a buffer (var_str buff) has a byte with high-order
> bit (in other words, a character with a code greater than 127).
> 
> Please, review and fix this bug in upstream.
> 
> -- 
> WBR, John Khvatov

-- 
WBR, John Khvatov
diff --git a/modules/db_http/db_http.so b/modules/db_http/db_http.so
index 4d845fc..4c79ac9 100755
Binary files a/modules/db_http/db_http.so and b/modules/db_http/db_http.so 
differ
diff --git a/modules/db_http/http_dbase.c b/modules/db_http/http_dbase.c
index 4b20fb9..a3c31e5 100644
--- a/modules/db_http/http_dbase.c
+++ b/modules/db_http/http_dbase.c
@@ -474,7 +474,7 @@ int form_result(var_str buff, db_res_t** r)
        while( cur < end )
        {
 
-               next = next_state[ state ][ (int)*cur ];
+               next = next_state[ state ][ (int)((unsigned char)*cur) ];
                consume = 1;
 
                if( state == OUT )
@@ -554,7 +554,7 @@ int form_result(var_str buff, db_res_t** r)
        {
                
 
-               next = next_state[ state ][ (int)*cur ];
+               next = next_state[ state ][ (int)((unsigned char)*cur) ];
                consume =  1;
                if( state == OUT )
                {
diff --git a/modules/db_http/http_dbase.o b/modules/db_http/http_dbase.o
index b48f6c7..11213cc 100644
Binary files a/modules/db_http/http_dbase.o and b/modules/db_http/http_dbase.o 
differ
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to