File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ static int is_git_directory(const char *suspect)
170
170
char path [PATH_MAX ];
171
171
size_t len = strlen (suspect );
172
172
173
+ if (PATH_MAX <= len + strlen ("/objects" ))
174
+ die ("Too long path: %.*s" , 60 , suspect );
173
175
strcpy (path , suspect );
174
176
if (getenv (DB_ENVIRONMENT )) {
175
177
if (access (getenv (DB_ENVIRONMENT ), X_OK ))
Original file line number Diff line number Diff line change @@ -451,8 +451,10 @@ library for your script to use.
451
451
- test_must_fail <git-command>
452
452
453
453
Run a git command and ensure it fails in a controlled way. Use
454
- this instead of "! <git-command>" to fail when git commands
455
- segfault.
454
+ this instead of "! <git-command>". When git-command dies due to a
455
+ segfault, test_must_fail diagnoses it as an error; "! <git-command>"
456
+ treats it as just another expected failure, which would let such a
457
+ bug go unnoticed.
456
458
457
459
- test_might_fail <git-command>
458
460
You can’t perform that action at this time.
0 commit comments