Ticket Hash: | 82cd90df7b2f2a176fa00468b3a740f82c97ded9 | |||
Title: | fossil bisect segfault | |||
Status: | Fixed | Type: | Code_Defect | |
Severity: | Cosmetic | Priority: | ||
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2011-03-30 18:58:58 | |||
Version Found In: | 51759d5248 | |||
Description: | ||||
fossil bisect <no args>
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; |
Attachments:
- bisect.diff [download] added by anonymous on 2011-03-30 17:52:14. [details]