diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2008-10-13 16:27:45 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2008-10-13 16:27:45 +0000 |
commit | 1108d1d1c543b734fff61bd435c69c2efe2d7045 (patch) | |
tree | b68a9643a87b8137ab8ee094dfab6263551911fc /content | |
parent | 38619e2d291a4f7516f80761393dd5d3e0616ac6 (diff) | |
download | netsurf-1108d1d1c543b734fff61bd435c69c2efe2d7045.tar.gz netsurf-1108d1d1c543b734fff61bd435c69c2efe2d7045.tar.bz2 |
Fix type-punning warning in fetch_data.c
svn path=/trunk/netsurf/; revision=5561
Diffstat (limited to 'content')
-rw-r--r-- | content/fetchers/fetch_data.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/fetchers/fetch_data.c b/content/fetchers/fetch_data.c index 1cc4b411a..a24fcd1e9 100644 --- a/content/fetchers/fetch_data.c +++ b/content/fetchers/fetch_data.c @@ -191,8 +191,12 @@ static bool fetch_data_process(struct fetch_data_context *c) /* we URL unescape the data first, just incase some insane page * decides to nest URL and base64 encoding. Like, say, Acid2. + * + * Note: the odd cast via void* is to prevent type-punning issues. + * we can be confident that size_t is at least as well aligned + * as int will be. */ - unescaped = curl_easy_unescape(curl, comma + 1, 0, (int *)&c->datalen); + unescaped = curl_easy_unescape(curl, comma + 1, 0, (int *)((void *)&c->datalen)); if (unescaped == NULL) { fetch_data_send_callback(FETCH_ERROR, c, "Unable to URL decode data: URL", 0); |