From: Kurt Zeilenga Date: Wed, 21 Jun 2000 00:40:10 +0000 (+0000) Subject: ITS#601: fix fetch bugs X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2554 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d4c721ffa3a567914be84a931ead14568510951b;p=openldap ITS#601: fix fetch bugs --- diff --git a/libraries/libldif/fetch.c b/libraries/libldif/fetch.c index 4dc179bbc5..daf9034598 100644 --- a/libraries/libldif/fetch.c +++ b/libraries/libldif/fetch.c @@ -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; }