..
This commit is contained in:
parent
d3bc020354
commit
e5b2c3be17
1 changed files with 2 additions and 3 deletions
|
@ -139,10 +139,9 @@ int main(int argc, char* argv[])
|
||||||
// Check input data format
|
// Check input data format
|
||||||
|
|
||||||
char* buffer = (char*)alloca(BUFFER_SIZE);
|
char* buffer = (char*)alloca(BUFFER_SIZE);
|
||||||
ssize_t length = read(STDIN_FILENO, buffer, DSD_MAGIC_SIZE);
|
|
||||||
|
|
||||||
if ((length != DSD_MAGIC_SIZE) ||
|
if ((read(STDIN_FILENO, buffer, DSD_MAGIC_SIZE) != DSD_MAGIC_SIZE) ||
|
||||||
(memcmp(buffer, DSD_MAGIC_TEXT, length) != 0))
|
(memcmp(buffer, DSD_MAGIC_TEXT, DSD_MAGIC_SIZE) != 0))
|
||||||
{
|
{
|
||||||
printf("Error checking input data format\n");
|
printf("Error checking input data format\n");
|
||||||
ReleaseRewindContext(context);
|
ReleaseRewindContext(context);
|
||||||
|
|
Loading…
Add table
Reference in a new issue