Simplewall: Returning local memory Bug

Created on 11 Aug 2018  路  1Comment  路  Source: henrypp/simplewall

https://github.com/henrypp/simplewall/blob/37a54f038ec3eb0e3ffc1797e911db4c446eb90c/src/main.cpp#L540

If True, _r_path_extractfile is returning local memory (as ~rstring() gets called). Suggested fix: Return result as a reference, e.g.

``C++ void _app_getdisplayname (size_t hash, ITEM_APP const *ptr_app, rstring& extracted_name ) { if ( hash == config.ntoskrnl_hash ) { extracted_name = ptr_app->original_path; } else if (ptr_app->type == AppStore) { _app_item_get (&packages, hash, &extracted_name, nullptr, nullptr, nullptr, nullptr); } else if (ptr_app->type == AppService) { extracted_name = ptr_app->original_path; } else { extracted_name = app.ConfigGet (L"ShowFilenames", true).AsBool () ? _r_path_extractfile( ptr_app->real_path ) : ptr_app->real_path; } }

bug

Most helpful comment

Fixed, thank you

>All comments

Fixed, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xnoreq picture xnoreq  路  3Comments

ghost picture ghost  路  4Comments

pwn0r picture pwn0r  路  4Comments

ltGuillaume picture ltGuillaume  路  3Comments

c-rilaun picture c-rilaun  路  3Comments