Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Heap buffer overflow in JoystickManager  (Read 3984 times)

0 Members and 1 Guest are viewing this topic.

JRock

  • Newbie
  • *
  • Posts: 1
    • View Profile
Heap buffer overflow in JoystickManager
« 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), 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;
}
 

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Heap buffer overflow in JoystickManager
« Reply #1 on: July 06, 2018, 11:07:51 am »
Can someone else confirm this?
SFML / OS X developer

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Heap buffer overflow in JoystickManager
« Reply #2 on: July 08, 2018, 12:06:17 am »
Is this Mac only?
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Heap buffer overflow in JoystickManager
« Reply #3 on: July 10, 2018, 09:59:38 am »
It was reported as such.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything