MAX_ALG_NAME_LENGTH
char alg[MAX_ALG_NAME_LENGTH];
while (*q != ':' && *q != '\0' && p < alg + MAX_ALG_NAME_LENGTH)