Bug 2565 - source/torture/t_strstr.c segfaults
Summary: source/torture/t_strstr.c segfaults
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.13
Hardware: Sparc Solaris
: P3 minor
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 16:22 UTC by Tim Bishop
Modified: 2005-08-24 10:22 UTC (History)
0 users

See Also:


Attachments
Check for NULL return from strstr_m (399 bytes, patch)
2005-04-01 16:24 UTC, Tim Bishop
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Bishop 2005-04-01 16:22:12 UTC
When running the test suite the t_strstr binary segfaults. Looking at the source 
it appears to printf the string returned from strstr_m, even though this value 
could be NULL (looking at the strstr_m source code it returns NULL in lots of 
places).

It appears as though other things in the test suite expect it to return (null) 
in this case, so I'll attach a patch which does exactly that.
Comment 1 Tim Bishop 2005-04-01 16:24:22 UTC
Created attachment 1133 [details]
Check for NULL return from strstr_m
Comment 2 Tim Potter 2005-04-01 17:57:04 UTC
Checked in - thanks!
Comment 3 Gerald (Jerry) Carter 2005-08-24 10:22:38 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.