Diff
Not logged in

Differences From:

File src/encode.c part of check-in [dbda8d6ce9] - Initial check-in of m1 sources. by drh on 2007-07-21 14:10:57. [view]

To:

File src/encode.c part of check-in [3dcaed8d86] - When accessing a remote repository, if there is a username/password specified as part of the URI, use these to login. by dan on 2007-07-28 07:09:25. Also file src/encode.c part of check-in [3a25b68390] - Only request the password one time on a push or pull. by drh on 2007-07-30 16:35:16. [view]

@@ -183,8 +183,12 @@
 ** in-place.  Return the length of the string after conversion.
 */
 int dehttpize(char *z){
   int i, j;
+
+  /* Treat a null pointer as a zero-length string. */
+  if( !z ) return 0;
+
   i = j = 0;
   while( z[i] ){
     switch( z[i] ){
       case '%':