Finding the index of a symbol in unsigned char and extracting contents?

Wondering if you have some kind of pointer abuse or buffer overrun going on. Note the line:

if (client.connect("ajxfcvag", MQTT_USER, MQTT_PASS)) {