ostafen / smart

String Matching Algorithms Research Tool
https://smart-tool.github.io/smart/
GNU General Public License v3.0
4 stars 2 forks source link

FIX seg fault in run. #61

Closed nishihatapalmer closed 1 year ago

nishihatapalmer commented 1 year ago
nishihatapalmer commented 1 year ago

Also adding another commit to avoid a div by zero error if m == n (unlikely, but possible I supposed), and to use memcpy consistently (not memcmp!)

nishihatapalmer commented 1 year ago

There is another possible edge case where m > n. Max pattern size is bigger than the text buffer. I'll put in a fix for this shortly.