]> git.sur5r.net Git - openldap/commitdiff
ITS#601: fix fetch bugs
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Jun 2000 00:40:10 +0000 (00:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Jun 2000 00:40:10 +0000 (00:40 +0000)
libraries/libldif/fetch.c

index 4dc179bbc5771df74bff62729cfa3b215b43595b..daf90345987018786b4a82b52ecdddd44bf7c5fd 100644 (file)
@@ -59,7 +59,7 @@ ldif_fetch_url(
                p = ber_strdup( p );
                ldap_pvt_hex_unescape( p );
 
-               url = fopen( p, "r" );
+               url = fopen( p, "rb" );
 
        } else {
                return -1;
@@ -79,7 +79,7 @@ ldif_fetch_url(
                        fclose( url );
                        return -1;
                }
-               newp = p;
+               p = newp;
                SAFEMEMCPY( &p[total], buffer, bytes );
                total += bytes;
        }