SFML community forums

Help => Window => Topic started by: JRock on June 29, 2018, 11:57:27 am

Title: Heap buffer overflow in JoystickManager
Post by: JRock on June 29, 2018, 11:57:27 am
Hey,

I've been working on a project using sfml and encountered an issue when plugging in a controller.
I am using Xcode and enabled the Address Sanitizer in Diagnostics.

Running any app with a controller plugged in or plugging in a controller at any time while the app is running produces a heap buffer overflow (see attached logs and example code).
The controller I'm using is a Logitech Precision Joystick (https://secure.logitech.com/assets/17241/17241.png (https://secure.logitech.com/assets/17241/17241.png)), I don't know if the issue happens with other controllers though.

I'm running on macOS 10.13.5 with Xcode 9.4.1 and SFML 2.5.0.

#include <SFML/Graphics.hpp>
#include <iostream>

int main(int, char const**)
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed) {
                window.close();
            }
        }

        window.clear();
        window.display();
    }

    return EXIT_SUCCESS;
}
 
Title: Re: Heap buffer overflow in JoystickManager
Post by: Hiura on July 06, 2018, 11:07:51 am
Can someone else confirm this?
Title: Re: Heap buffer overflow in JoystickManager
Post by: FRex on July 08, 2018, 12:06:17 am
Is this Mac only?
Title: Re: Heap buffer overflow in JoystickManager
Post by: eXpl0it3r on July 10, 2018, 09:59:38 am
It was reported as such.