jyberg / Enhanced-Nextion-Library

Enhanced Nextion library for Arduino, NodeMcu, Esp8266,...
MIT License
47 stars 23 forks source link

Null pointer dereference in the event queue handling code #34

Closed alyf80 closed 8 months ago

alyf80 commented 8 months ago

https://github.com/jyberg/Enhanced-Nextion-Library/blob/3448d5beeb49b11aeb1d791929f845e435d8516c/src/NexHardware.cpp#L97C1-L97C67

nexQueuedEvent *last = m_queuedEvents->m_next;

should be

nexQueuedEvent *last = m_queuedEvents;

Otherwise trying to add a new event when the queue contains exactly one will result in a crash.