Skip to content

Commit

Permalink
Open pac file in rb mode. (#175)
Browse files Browse the repository at this point in the history
= This is to ensure there is no discrepancy in bytes read and file size.
  • Loading branch information
manugarg authored Nov 22, 2023
1 parent f4a5c4d commit be49ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pacparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ _debug(void) {
static char * // File content in string or NULL if failed.
read_file_into_str(const char *filename)
{
FILE *fptr = fopen(filename, "r");
FILE *fptr = fopen(filename, "rb");
if (fptr == NULL) return NULL;

if (fseek(fptr, 0L, SEEK_END) != 0) goto error2;
Expand Down

0 comments on commit be49ce3

Please sign in to comment.