Implement input validation for string length and index capacity in similarity_search_addon.cc and similarity_search.c; enhance memory management in search_index function.
This commit is contained in:
@@ -14,6 +14,7 @@ extern "C" {
|
||||
typedef struct {
|
||||
char **strings;
|
||||
int num_strings;
|
||||
int capacity;
|
||||
} SearchIndex;
|
||||
|
||||
// Structure to hold a search result
|
||||
|
||||
Reference in New Issue
Block a user