crypto/bio/b_addr.c:498: error: NULL_DEREFERENCE
  pointer `p` last assigned on line 460 could be null and is dereferenced by call to `strchr()` at line 498, column 9.
Showing all 13 steps of the trace


crypto/bio/b_addr.c:447:1: start of procedure BIO_parse_hostserv()
445.    *
446.    */
447. > int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
448.                          enum BIO_hostserv_priorities hostserv_prio)
449.   {

crypto/bio/b_addr.c:450:5: 
448.                          enum BIO_hostserv_priorities hostserv_prio)
449.   {
450. >     const char *h = NULL; size_t hl = 0;
451.       const char *p = NULL; size_t pl = 0;
452.   

crypto/bio/b_addr.c:450:27: 
448.                          enum BIO_hostserv_priorities hostserv_prio)
449.   {
450. >     const char *h = NULL; size_t hl = 0;
451.       const char *p = NULL; size_t pl = 0;
452.   

crypto/bio/b_addr.c:451:5: 
449.   {
450.       const char *h = NULL; size_t hl = 0;
451. >     const char *p = NULL; size_t pl = 0;
452.   
453.       if (*hostserv == '[') {

crypto/bio/b_addr.c:451:27: 
449.   {
450.       const char *h = NULL; size_t hl = 0;
451. >     const char *p = NULL; size_t pl = 0;
452.   
453.       if (*hostserv == '[') {

crypto/bio/b_addr.c:453:9: Taking true branch
451.       const char *p = NULL; size_t pl = 0;
452.   
453.       if (*hostserv == '[') {
               ^
454.           if ((p = strchr(hostserv, ']')) == NULL)
455.               goto spec_err;

crypto/bio/b_addr.c:454:13: Taking false branch
452.   
453.       if (*hostserv == '[') {
454.           if ((p = strchr(hostserv, ']')) == NULL)
                   ^
455.               goto spec_err;
456.           h = hostserv + 1;

crypto/bio/b_addr.c:456:9: 
454.           if ((p = strchr(hostserv, ']')) == NULL)
455.               goto spec_err;
456. >         h = hostserv + 1;
457.           hl = p - h;
458.           p++;

crypto/bio/b_addr.c:457:9: 
455.               goto spec_err;
456.           h = hostserv + 1;
457. >         hl = p - h;
458.           p++;
459.           if (*p == '\0')

crypto/bio/b_addr.c:458:9: 
456.           h = hostserv + 1;
457.           hl = p - h;
458. >         p++;
459.           if (*p == '\0')
460.               p = NULL;

crypto/bio/b_addr.c:459:13: Taking true branch
457.           hl = p - h;
458.           p++;
459.           if (*p == '\0')
                   ^
460.               p = NULL;
461.           else if (*p != ':')

crypto/bio/b_addr.c:460:13: 
458.           p++;
459.           if (*p == '\0')
460. >             p = NULL;
461.           else if (*p != ':')
462.               goto spec_err;

crypto/bio/b_addr.c:498:9: 
496.       }
497.   
498. >     if (strchr(p, ':'))
499.           goto spec_err;
500.   
