diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 3322c3a2eef3f331ea716690039c8b38bf4a6fd0..edb40429ec4465f3bebba02f2174314dd0183225 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
#include "diff.h"
#include "path-list.h"
#include "revision.h"
-#include <string.h>
static const char shortlog_usage[] =
"git-shortlog [-n] [-s] [<commit-id>... ]";
bob = buffer + strlen(buffer);
else {
offset = 8;
- if (isspace(bob[-1]))
+ while (buffer + offset < bob &&
+ isspace(bob[-1]))
bob--;
}