Skip to content

Commit

Permalink
Fix \0 bug for srcip and destip, thanks M. Langendoen!
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroennijhof committed May 23, 2014
1 parent d96bc56 commit 94a068b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openufp.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#define UNKNOWN 65535
struct uf_request {
uint16_t type;
char srcip[15];
char dstip[15];
char srcip[16];
char dstip[16];
char url[URL_SIZE];
char usr[URL_SIZE];
};
Expand Down
2 changes: 1 addition & 1 deletion squidguard.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int squidguard_closefd(FILE *sg_fd[2]) {
return 0;
}

int squidguard_backend(FILE *sg_fd[2], char srcip[15], char srcusr[URL_SIZE], char url[URL_SIZE], char *sg_redirect, int debug) {
int squidguard_backend(FILE *sg_fd[2], char srcip[16], char srcusr[URL_SIZE], char url[URL_SIZE], char *sg_redirect, int debug) {
char redirect_url[URL_SIZE];

//Check user; if empty, use ip only:
Expand Down
2 changes: 1 addition & 1 deletion squidguard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

extern int squidguard_getfd(FILE *sg_fd[2]);
extern int squidguard_closefd(FILE *sg_fd[2]);
extern int squidguard_backend(FILE *sg_fd[2], char srcip[15], char srcusr[URL_SIZE], char url[URL_SIZE], char *sg_redirect, int debug);
extern int squidguard_backend(FILE *sg_fd[2], char srcip[16], char srcusr[URL_SIZE], char url[URL_SIZE], char *sg_redirect, int debug);

0 comments on commit 94a068b

Please sign in to comment.