content_encoding: change return code to typedef'ed enum
... to work around a clang ubsan warning. Fixes #12618 Closes #12622
This commit is contained in:
Родитель
941b56d790
Коммит
8558647613
|
@ -365,11 +365,14 @@ static CURLcode gzip_do_init(struct Curl_easy *data,
|
||||||
|
|
||||||
#ifdef OLD_ZLIB_SUPPORT
|
#ifdef OLD_ZLIB_SUPPORT
|
||||||
/* Skip over the gzip header */
|
/* Skip over the gzip header */
|
||||||
static enum {
|
typedef enum {
|
||||||
GZIP_OK,
|
GZIP_OK,
|
||||||
GZIP_BAD,
|
GZIP_BAD,
|
||||||
GZIP_UNDERFLOW
|
GZIP_UNDERFLOW
|
||||||
} check_gzip_header(unsigned char const *data, ssize_t len, ssize_t *headerlen)
|
} gzip_status;
|
||||||
|
|
||||||
|
static gzip_status check_gzip_header(unsigned char const *data, ssize_t len,
|
||||||
|
ssize_t *headerlen)
|
||||||
{
|
{
|
||||||
int method, flags;
|
int method, flags;
|
||||||
const ssize_t totallen = len;
|
const ssize_t totallen = len;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче