antirez / sds

Simple Dynamic Strings library for C
BSD 2-Clause "Simplified" License
4.93k stars 480 forks source link

fix sdsnewlen s_malloc fail, null pointer operator. #92

Closed cppcoffee closed 6 years ago

cppcoffee commented 6 years ago

hi, sdsnewlen s_malloc call failed, sh == NULL, and memset(sh, 0, ...) cause segment fault

cppcoffee commented 6 years ago

same fix #89