Commit e5b2c3be authored by Artem Prilutskiy's avatar Artem Prilutskiy

..

parent d3bc0203
......@@ -139,10 +139,9 @@ int main(int argc, char* argv[])
// Check input data format
char* buffer = (char*)alloca(BUFFER_SIZE);
ssize_t length = read(STDIN_FILENO, buffer, DSD_MAGIC_SIZE);
if ((length != DSD_MAGIC_SIZE) ||
(memcmp(buffer, DSD_MAGIC_TEXT, length) != 0))
if ((read(STDIN_FILENO, buffer, DSD_MAGIC_SIZE) != DSD_MAGIC_SIZE) ||
(memcmp(buffer, DSD_MAGIC_TEXT, DSD_MAGIC_SIZE) != 0))
{
printf("Error checking input data format\n");
ReleaseRewindContext(context);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment