load_buffer_impl always checks buffer and size

added tests to force invalid buffer and size = 0