if (dir->recv() <= 0) { /* get response */
goto bail_out;
}
- if (sscanf(dir->msg, "btime %s", buf) != 1) {
+ if (sscanf(dir->msg, "btime %50s", buf) != 1) {
goto bail_out;
}
his_time = str_to_uint64(buf);
Dmsg1(100, "ClientCmd: %s", dir->msg);
jcr->sd_calls_client = true;
- if (sscanf(dir->msg, "client address=%s port=%d ssl=%d", &jcr->client_addr, &client_port,
+ if (sscanf(dir->msg, "client address=%127s port=%d ssl=%d", jcr->client_addr, &client_port,
&enable_ssl) != 3) {
pm_strcpy(jcr->errmsg, dir->msg);
Jmsg(jcr, M_FATAL, 0, _("[SF0101] Bad client command: %s"), jcr->errmsg);
/* Each line is supposed to start with "ID", and end with "path" */
bool ok = false;
- if (sscanf(p, "ID %50s ", id) == 1) { /* We found ID, look for path */
+ if (sscanf(p, "ID %49s ", id) == 1) { /* We found ID, look for path */
p2 = strstr(p, "path ");
if (p2) {
path = p2 + strlen("path ");
strcpy(v->path, path);
p2 = strstr(p, "otime");
- if (p2 && sscanf(p2, "otime %50s %50s", day, hour) == 2) {
+ if (p2 && sscanf(p2, "otime %49s %49s", day, hour) == 2) {
bsnprintf(v->otime, sizeof(v->otime), "%s %s", day, hour);
}
}
/* Each line is supposed to start with "ID", and end with "path" */
- ok = (sscanf(p, "ID %50s ", id) == 1);
+ ok = (sscanf(p, "ID %49s ", id) == 1);
if (ok) { /* We found ID, look for path */
p = strstr(p, "path ");
if (p) {
/* Flush the current one */
if (!arg->device || strcmp(arg->device, buf[0]) == 0) {
- if (sscanf(buf[3], "%s %s %d %d:%d %d",
+ if (sscanf(buf[3], "%49s %49s %d %d:%d %d",
DayW, Month, &Day, &Hour, &Min, &Year) == 6)
{
/* Get a clean iso format */