I am trying to disscet this string into 2 parts at the char ';'
Am i right to malloc for the extra byte concerning the NULL?Code:"crafted;def6049" the strlen of this is 15 phrase_len = strcspn (buffer, ";"); phrase_len = 7 phrase = (char *) safe_malloc ((phrase_len + 1) * sizeof (char));
Wont this create a string array starting at 0 finishing at 8 and then if i copied "crafted" to phrase, I would be left with 2 spaces at the end instead of one for the null.
Is that right?