Fossil SCM

fossil bisect segfault

Fixed

82cd90df7b2f2a1… · opened 15 years ago

Type
Code_Defect
Priority
Severity
Cosmetic
Resolution
Fixed
Subsystem
Created
March 30, 2011 5:50 p.m.

fossil bisect Segmentation fault (core dumped)

strlen(NULL) is a bad idea, at least on OpenBSD and Solaris:-)

- mho

Index: src/bisect.c

--- src/bisect.c +++ src/bisect.c @@ -88,10 +88,13 @@ / void bisect_cmd(void){ int n; const char zCmd; db_must_be_within_tree(); + if (g.argc < 3) { + usage("bad|good|next|reset|vlist ..."); + }; zCmd = g.argv[2]; n = strlen(zCmd); if( n==0 ) zCmd = "-"; if( memcmp(zCmd, "bad", n)==0 ){ int ridBad;

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button