File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ static int is_git_directory(const char *suspect)
170170 char path [PATH_MAX ];
171171 size_t len = strlen (suspect );
172172
173+ if (PATH_MAX <= len + strlen ("/objects" ))
174+ die ("Too long path: %.*s" , 60 , suspect );
173175 strcpy (path , suspect );
174176 if (getenv (DB_ENVIRONMENT )) {
175177 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.
451451 - test_must_fail <git-command>
452452
453453 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.
456458
457459 - test_might_fail <git-command>
458460
You can’t perform that action at this time.
0 commit comments