Made local APPS_DIR for cmake.
Initialized uinitilized result_size.