OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_8-19-g564573d

Gerrit Code Review
Tue, 3 Jun 2014 12:27:08 -0400

The following commit has been merged in the openafs-stable-1_6_x branch:
commit 564573da48f61e5d96d5df017d25a39c930d566f
Author: Simon Wilkinson <>
Date:   Thu Feb 28 12:15:29 2013 +0000

    dumptool: Remove newlines safely
    The code currently does
       fgets(cmdbuf, ... );
       cmdbuf[strlen(cmdbuf - 1)] = '\0';
    in order to remove new lines from cmdbuf. Coverity thinks there's
    a danger of strlen(cmdbuf) being 0, and thus the strlen being negative.
    That shouldn't happen, but if fgets hits EOF midway through a line, we
    might get a string that doesn't have a trailing '\n', and end up
    removing the wrong character. Tidy this up by checking that the string
    isn't 0 length, and that the character we're zapping is a newline.
    Caught by coverity (#985430)
    Reviewed-by: Derrick Brashear <>
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>
    (cherry picked from commit 8f51502e5f45a43fba130d260813716be894d51e)
    Change-Id: Ie165c8e50c4071c07fffa220601c8b5e92ccf815
    Reviewed-by: Chas Williams - CONTRACTOR <>
    Tested-by: BuildBot <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Stephan Wiesand <>

 src/tests/dumptool.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

OpenAFS Master Repository