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


crypto/bio/b_addr.c:457:1: start of procedure BIO_parse_hostserv()
455.    *
456.    */
457. > int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
458.                          enum BIO_hostserv_priorities hostserv_prio)
459.   {

crypto/bio/b_addr.c:460:5: 
458.                          enum BIO_hostserv_priorities hostserv_prio)
459.   {
460. >     const char *h = NULL; size_t hl = 0;
461.       const char *p = NULL; size_t pl = 0;
462.   

crypto/bio/b_addr.c:460:27: 
458.                          enum BIO_hostserv_priorities hostserv_prio)
459.   {
460. >     const char *h = NULL; size_t hl = 0;
461.       const char *p = NULL; size_t pl = 0;
462.   

crypto/bio/b_addr.c:461:5: 
459.   {
460.       const char *h = NULL; size_t hl = 0;
461. >     const char *p = NULL; size_t pl = 0;
462.   
463.       if (*hostserv == '[') {

crypto/bio/b_addr.c:461:27: 
459.   {
460.       const char *h = NULL; size_t hl = 0;
461. >     const char *p = NULL; size_t pl = 0;
462.   
463.       if (*hostserv == '[') {

crypto/bio/b_addr.c:463:9: Taking true branch
461.       const char *p = NULL; size_t pl = 0;
462.   
463.       if (*hostserv == '[') {
               ^
464.           if ((p = strchr(hostserv, ']')) == NULL)
465.               goto spec_err;

crypto/bio/b_addr.c:464:13: Taking false branch
462.   
463.       if (*hostserv == '[') {
464.           if ((p = strchr(hostserv, ']')) == NULL)
                   ^
465.               goto spec_err;
466.           h = hostserv + 1;

crypto/bio/b_addr.c:466:9: 
464.           if ((p = strchr(hostserv, ']')) == NULL)
465.               goto spec_err;
466. >         h = hostserv + 1;
467.           hl = p - h;
468.           p++;

crypto/bio/b_addr.c:467:9: 
465.               goto spec_err;
466.           h = hostserv + 1;
467. >         hl = p - h;
468.           p++;
469.           if (*p == '\0')

crypto/bio/b_addr.c:468:9: 
466.           h = hostserv + 1;
467.           hl = p - h;
468. >         p++;
469.           if (*p == '\0')
470.               p = NULL;

crypto/bio/b_addr.c:469:13: Taking true branch
467.           hl = p - h;
468.           p++;
469.           if (*p == '\0')
                   ^
470.               p = NULL;
471.           else if (*p != ':')

crypto/bio/b_addr.c:470:13: 
468.           p++;
469.           if (*p == '\0')
470. >             p = NULL;
471.           else if (*p != ':')
472.               goto spec_err;

crypto/bio/b_addr.c:508:9: 
506.       }
507.   
508. >     if (strchr(p, ':'))
509.           goto spec_err;
510.   
