Hi,

I have(had) a problem using curl as a command line tool for the
requests:

Config:
  ./configure <...> --enable-curl --disable-libcurl

The result of "oauth_exec_shell" always returned crap when the result
of the curl command was longer than 1024 byte.

There is a problem in buffer handling in "oauth_exec_shell".
This (quick hack) patch works for me:

--- liboauth-0.9.4/src/oauth_http.c~    2011-01-26 08:04:12.000000000
-0800
+++ liboauth-0.9.4/src/oauth_http.c     2011-03-15 11:03:15.355252656
-0700
@@ -447,7 +447,7 @@
   while (in && rcv > 0 && !feof(in)) {
     alloc +=1024;
     data = (char*)xrealloc(data, alloc * sizeof(char));
-    rcv = fread(data, sizeof(char), 1024, in);
+    rcv = fread(data + (alloc - 1024), sizeof(char), 1024, in);
     len += rcv;
   }
   pclose(in);


Greetings,
warter

-- 
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.

Reply via email to