about summary refs log tree commit diff stats
path: root/src/LYCookie.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/LYCookie.c')
-rw-r--r--src/LYCookie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LYCookie.c b/src/LYCookie.c
index 162bd765..1597d49a 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -1976,7 +1976,7 @@ PUBLIC void LYLoadCookies ARGS1 (
     CTRACE(tfp, "LYLoadCookies: reading cookies from %s\n", cookie_file);
 
     number_of_file_cookies = 0;
-    while ((buf = LYSafeGets(buf, cookie_handle)) != 0) {
+    while (LYSafeGets(&buf, cookie_handle) != 0) {
 	cookie *moo;
 	unsigned i = 0;
 	int tok_loop;
@@ -1993,7 +1993,7 @@ PUBLIC void LYLoadCookies ARGS1 (
 	 * cookie.
 	 */
 
-	while(buf[i] != '\n' && i < sizeof(buf)) {
+	while(buf[i] != '\n' && buf[i] != 0) {
 	    i++;
 	}
 	buf[i] = '\0';