Skip to content

Allow port nil #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed

Allow port nil #1

wants to merge 7 commits into from

Conversation

rainingmaster
Copy link
Owner

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

rainingmaster pushed a commit that referenced this pull request Apr 18, 2021
…found by coverity

   deref_ptr: Directly dereferencing pointer c.
419    if (c->addr_text.len) {
420        p = ngx_snprintf(buf, len, ", client: %V", &c->addr_text);
421        len -= p - buf;
422        buf = p;
423    }
424
   CID 149837 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking c suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
425    if (c && c->listening && c->listening->addr_text.len) {
426        p = ngx_snprintf(buf, len, ", server: %V", &c->listening->addr_text);
427        /* len -= p - buf; */
428        buf = p;
429    }
rainingmaster pushed a commit that referenced this pull request Apr 18, 2021
…esty#1846)

734    buf = p;
735
   deref_ptr: Directly dereferencing pointer c.
736    if (c->addr_text.len) {
737        p = ngx_snprintf(buf, len, ", client: %V", &c->addr_text);
738        len -= p - buf;
739        buf = p;
740    }
741
   CID 149839 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking c suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
742    if (c && c->listening && c->listening->addr_text.len) {
743        p = ngx_snprintf(buf, len, ", server: %V", &c->listening->addr_text);
744        /* len -= p - buf; */
745        buf = p;
746    }
zhuizhuhaomeng pushed a commit that referenced this pull request Dec 26, 2021
==openresty==70603==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x621000001500,0x621000002181) and [0x62100000187f, 0x621000002500) overlap
    #0 0x7f3db1899ffe  (/lib64/libasan.so.5+0x99ffe)
    #1 0x9da926  (/usr/local/openresty-debug/nginx/sbin/nginx+0x9da926)
    #2 0x9dd1a1  (/usr/local/openresty-debug/nginx/sbin/nginx+0x9dd1a1)
    #3 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    openresty#4 0x5d1e4e  (/usr/local/openresty-debug/nginx/sbin/nginx+0x5d1e4e)
    openresty#5 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    openresty#6 0x5b8583  (/usr/local/openresty-debug/nginx/sbin/nginx+0x5b8583)
    openresty#7 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    openresty#8 0x4b4419  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4b4419)
    openresty#9 0x427f16  (/usr/local/openresty-debug/nginx/sbin/nginx+0x427f16)
    openresty#10 0x7f3daff27554  (/lib64/libc.so.6+0x22554)
    openresty#11 0x42d537  (/usr/local/openresty-debug/nginx/sbin/nginx+0x42d537)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants