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


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

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

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

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

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

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

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

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

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

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

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

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

crypto/bio/b_addr.c:501:9: 
499.       }
500.   
501. >     if (strchr(p, ':'))
502.           goto spec_err;
503.   
