vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
673 stars 56 forks source link

Overruning write by sccanf #576

Open szsam opened 1 year ago

szsam commented 1 year ago

In the following sscanf calls, '%64s' requires 65 bytes. https://github.com/vmware/splinterdb/blob/6a2348c0eb9887cdafee3dad674a96e41edddb28/tests/functional/ycsb_test.c#L584 https://github.com/vmware/splinterdb/blob/6a2348c0eb9887cdafee3dad674a96e41edddb28/tests/functional/ycsb_test.c#L598-L602

But the length of result[i].key is only 24 bytes. https://github.com/vmware/splinterdb/blob/6a2348c0eb9887cdafee3dad674a96e41edddb28/tests/functional/ycsb_test.c#L244-L246 https://github.com/vmware/splinterdb/blob/6a2348c0eb9887cdafee3dad674a96e41edddb28/tests/functional/ycsb_test.c#L17

Please either modify the sscanf format specifier, or make YCSB_KEY_SIZE larger.