tobhahn / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

CustomInfoEntry crash (windows) #325

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
google_breakpad::CustomInfoEntry::set_name and set_value use safe_wcscpy() 
which crashes (calls invalid_param_handler) if the length is bigger than 
64.

From msdn
"If strDestination or strSource is a null pointer, or if the destination 
string is too small, the invalid parameter handler is invoked as described 
in Parameter Validation. If execution is allowed to continue, these 
functions return EINVAL and set errno to EINVAL."

The breakpad header (string_utils) says that this should not fail (line 75)

I think it should truncate and not raise a fatal error as the documentation 
states. Basically use safe_wcsncpy.

Original issue reported on code.google.com by cpu@chromium.org on 26 Jun 2009 at 8:58

GoogleCodeExporter commented 9 years ago
Munjal, can you take a look please?

Thanks

Nicolas

Original comment by nsylv...@gmail.com on 26 Jun 2009 at 8:59