diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-02 15:13:29 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-02 15:13:29 +0000 |
commit | 5544f503bf0fcfd050b4e338e8ec7b22e2f53b9a (patch) | |
tree | 2d65f1fd285c450cbb1c676697ad13b5a47a835c /src/proxy/store.c | |
parent | b3fa8537c411e6e2d53044b1d5d20c361d2ad17d (diff) |
Big cleanup in functions writing to a char buffer without proper size boundary.
Diffstat (limited to 'src/proxy/store.c')
-rw-r--r-- | src/proxy/store.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proxy/store.c b/src/proxy/store.c index 9475412..1702bc8 100644 --- a/src/proxy/store.c +++ b/src/proxy/store.c @@ -1157,7 +1157,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char *url, /* Read in memory from cache */ if (flags & FETCH_BODY) { if (strnotempty(previous_save)) { - FILE *fp = fopen(fconv(catbuff, previous_save), "rb"); + FILE *fp = fopen(file_convert(catbuff, sizeof(catbuff), previous_save), "rb"); if (fp != NULL) { r->adr = (char *) malloc(r->size + 4); @@ -1179,7 +1179,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char *url, } else { r->statuscode = STATUSCODE_INVALID; sprintf(r->msg, "Read error (can't open '%s') from cache", - fconv(catbuff, previous_save)); + file_convert(catbuff, sizeof(catbuff), previous_save)); } } else { r->statuscode = STATUSCODE_INVALID; |