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 | |
parent | 8f9242649a0573f003894b3e1c6499cab0d35520 (diff) | |
download | bulk-ln-9e8b78eb15ca81518e6dfd95244253388ca5cf81.zip bulk-ln-9e8b78eb15ca81518e6dfd95244253388ca5cf81.tar.gz |
Fix bug of bad length.
-rw-r--r-- | contrib/build-env-setup/setup | 2 | ||||
-rw-r--r-- | src/bulk_ln/bulk_ln.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/build-env-setup/setup b/contrib/build-env-setup/setup index 31c5f11..b9f0f28 100644 --- a/contrib/build-env-setup/setup +++ b/contrib/build-env-setup/setup @@ -27,6 +27,6 @@ true \ && find . -not -wholename './dist*' -delete \ && ${PKGDEL:?} $PKGS_TO_DEL && ${PKGCLEAN:?} \ && dirOfDistBundle="$(realpath dist)" \ - && printf '\n SUCCESS :) Distribution bundle is ready in:\n\n %s\n\n Tip: Before pulling out your hair about how to get that archive out of\n your qemu VM. STOP kluding around with silly tools and learn how\n basic tools do the job perfectly fine:\n\n ssh %s@localhost -p2222 -- sh -c '\''true && cd "%s" && tar c *'\'' | tar x\n\n BTW: In addition bulk-ln got installed and is ready-to-use.\n\n' "${dirOfDistBundle:?}" "$USER" "${dirOfDistBundle:?}" \ + && printf '\n SUCCESS :) Distribution bundle is ready in:\n\n %s\n\n Tip: Before pulling out your hair about how to get that archive out of\n your qemu VM. STOP kluding around with silly tools and learn how\n basic tools do the job perfectly fine:\n\n ssh %s@localhost -p%d -T '\''true && cd "%s" && tar c *'\'' | tar x\n\n BTW: In addition bulk-ln got installed and is ready-to-use.\n\n' "${dirOfDistBundle:?}" "$USER" "$(env|grep SSH_CLIENT|cut -d' ' -f3)" "${dirOfDistBundle:?}" \ && true 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); |