Loading docs/examples/cacertinmem.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -111,7 +111,7 @@ err: fprintf(stderr, "error adding certificate\n"); if(error) { ERR_error_string_n(error, errbuf, sizeof errbuf); ERR_error_string_n(error, errbuf, sizeof(errbuf)); fprintf(stderr, "%s\n", errbuf); } } Loading docs/examples/multi-uv.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -50,7 +50,7 @@ static curl_context_t* create_curl_context(curl_socket_t sockfd) { curl_context_t *context; context = (curl_context_t *) malloc(sizeof *context); context = (curl_context_t *) malloc(sizeof(*context)); context->sockfd = sockfd; Loading lib/checksrc.pl +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ my %warnings = ( 'NOSPACEEQUALS' => 'equals sign without preceding space', 'SEMINOSPACE' => 'semicolon without following space', 'MULTISPACE' => 'multiple spaces used when not suitable', 'SIZEOFNOPAREN' => 'use of sizeof without parentheses', ); sub readwhitelist { Loading Loading @@ -417,6 +418,17 @@ sub scanfile { } } # check for "sizeof" without parenthesis if(($l =~ /^(.*)sizeof *([ (])/) && ($2 ne "(")) { if($1 =~ / *\#/) { # this is a #if, treat it differently } else { checkwarn("SIZEOFNOPAREN", $line, length($1)+6, $file, $l, "sizeof without parenthesis"); } } # check for comma without space if($l =~ /^(.*),[^ \n]/) { my $pref=$1; Loading lib/formdata.c +1 −1 Original line number Diff line number Diff line Loading @@ -725,7 +725,7 @@ int curl_formget(struct curl_httppost *form, void *arg, while(!result) { char buffer[8192]; size_t nread = Curl_mime_read(buffer, 1, sizeof buffer, &toppart); size_t nread = Curl_mime_read(buffer, 1, sizeof(buffer), &toppart); if(!nread) break; Loading lib/hmac.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -58,7 +58,7 @@ Curl_HMAC_init(const HMAC_params * hashparams, unsigned char b; /* Create HMAC context. */ i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + i = sizeof(*ctxt) + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen; ctxt = malloc(i); Loading Loading
docs/examples/cacertinmem.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -111,7 +111,7 @@ err: fprintf(stderr, "error adding certificate\n"); if(error) { ERR_error_string_n(error, errbuf, sizeof errbuf); ERR_error_string_n(error, errbuf, sizeof(errbuf)); fprintf(stderr, "%s\n", errbuf); } } Loading
docs/examples/multi-uv.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -50,7 +50,7 @@ static curl_context_t* create_curl_context(curl_socket_t sockfd) { curl_context_t *context; context = (curl_context_t *) malloc(sizeof *context); context = (curl_context_t *) malloc(sizeof(*context)); context->sockfd = sockfd; Loading
lib/checksrc.pl +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ my %warnings = ( 'NOSPACEEQUALS' => 'equals sign without preceding space', 'SEMINOSPACE' => 'semicolon without following space', 'MULTISPACE' => 'multiple spaces used when not suitable', 'SIZEOFNOPAREN' => 'use of sizeof without parentheses', ); sub readwhitelist { Loading Loading @@ -417,6 +418,17 @@ sub scanfile { } } # check for "sizeof" without parenthesis if(($l =~ /^(.*)sizeof *([ (])/) && ($2 ne "(")) { if($1 =~ / *\#/) { # this is a #if, treat it differently } else { checkwarn("SIZEOFNOPAREN", $line, length($1)+6, $file, $l, "sizeof without parenthesis"); } } # check for comma without space if($l =~ /^(.*),[^ \n]/) { my $pref=$1; Loading
lib/formdata.c +1 −1 Original line number Diff line number Diff line Loading @@ -725,7 +725,7 @@ int curl_formget(struct curl_httppost *form, void *arg, while(!result) { char buffer[8192]; size_t nread = Curl_mime_read(buffer, 1, sizeof buffer, &toppart); size_t nread = Curl_mime_read(buffer, 1, sizeof(buffer), &toppart); if(!nread) break; Loading
lib/hmac.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -58,7 +58,7 @@ Curl_HMAC_init(const HMAC_params * hashparams, unsigned char b; /* Create HMAC context. */ i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + i = sizeof(*ctxt) + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen; ctxt = malloc(i); Loading