cs01 / cs01/gdbgui

BinaryLoader.tsx:233 Uncaught TypeError: Cannot read properties of undefined (reading 'trim')

Open
#453 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
521
PR merge metrics
No merged PRs in 30d

Description

when the input is empty and i click the top-left blue button, the js console shows

## error

```
BinaryLoader.tsx:233 Uncaught TypeError: Cannot read properties of undefined (reading 'trim')
at t.set_target_app (BinaryLoader.tsx:233:44)
at t.click_set_target_app (BinaryLoader.tsx:196:10)
```

## source

https://github.com/cs01/gdbgui/blob/9138473156116340c2b1c0b72d35dba32b4a3bd6/gdbgui/src/js/BinaryLoader.tsx#L232-L241

## fix

the condition should be

```js
if (!this.state.user_input)
```

## env

* OS:
* gdbgui version (`gdbgui -v`): 0.15.0.1-unstable-2022-06-22 = source build from 9138473156116340c2b1c0b72d35dba32b4a3bd6
* gdb version (`gdb -v`):
* browser [e.g. chrome, safari]:
* python packages (`pip freeze`):

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.