zmqsocket bug fix: memcpy source and destination overlap

This commit is contained in:
Dhanya Thattil
2020-02-25 10:28:23 +01:00
committed by GitHub
parent 63f5b52a6e
commit e61d1a1651

View File

@ -286,7 +286,7 @@ public:
"\"flippedDataX\":%u"
;//"}\n";
int length = sprintf(buf, jsonHeaderFormat,
sprintf(buf, jsonHeaderFormat,
jsonversion, dynamicrange, fileIndex, npixelsx, npixelsy, imageSize,
acqIndex, fIndex, (fname == NULL)? "":fname, dummy?0:1,
@ -298,10 +298,12 @@ public:
((flippedData == 0 ) ? 0 :flippedData[0])
);
if (additionalJsonHeader && strlen(additionalJsonHeader)) {
length = sprintf(buf, "%s, %s}\n", buf, additionalJsonHeader);
} else {
length = sprintf(buf, "%s}\n", buf);
strcat(buf, ", ");
strcat(buf, additionalJsonHeader);
}
strcat(buf,"}\n");
int length = strlen(buf);
#ifdef VERBOSE
//if(!index)