diff options
author | Andreas Fankhauser hiddenalpha.ch | 2024-10-11 16:46:35 +0200 |
---|---|---|
committer | Andreas Fankhauser hiddenalpha.ch | 2024-10-11 16:46:35 +0200 |
commit | 9e8b78eb15ca81518e6dfd95244253388ca5cf81 (patch) | |
tree | fe87ad5754060acebbe8afabd1baf33dca0754dd /src | |
parent | 8f9242649a0573f003894b3e1c6499cab0d35520 (diff) | |
download | bulk-ln-9e8b78eb15ca81518e6dfd95244253388ca5cf81.zip bulk-ln-9e8b78eb15ca81518e6dfd95244253388ca5cf81.tar.gz |
Fix bug of bad length.
Diffstat (limited to 'src')
-rw-r--r-- | src/bulk_ln/bulk_ln.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bulk_ln/bulk_ln.c b/src/bulk_ln/bulk_ln.c index ae9e51c..9b7c7ca 100644 --- a/src/bulk_ln/bulk_ln.c +++ b/src/bulk_ln/bulk_ln.c @@ -350,7 +350,7 @@ static int parseDataFileAsPairPerLine( BulkLn*bulkLn ){ bulkLn->dataFilePath, lineNum); err = -1; goto finally; } - char *unwantedTab = memchr(tab + 1, DATA_FILE_FIELD_SEP_CHR, tab + 1 - buf); + char *unwantedTab = memchr(tab + 1, DATA_FILE_FIELD_SEP_CHR, buf_len - (tab - buf + 2)); if( unwantedTab != NULL ){ fprintf(stderr, "Too many field separators (tab) in '%s' @ %lu\n", bulkLn->dataFilePath, lineNum); |