ofVideoGrabber initGrabber can access bad memory on mac

In listDevices() there are two occurances where the line similar to the below
(approx 148)
Should change from
memcpy(pascalName, (*deviceList)->entry[i].name, sizeof(char) * 64);
memcpy(pascalName, (*deviceList)->entry[i].name, sizeof(char) * 256);

because the size of the entry[i].name is only 64 bytes.

Also in qtSelectDevices this problem exists in two instances.

I realize that the write address is valid for 256, so the program state may be okay, but I think you occasionally get an exception if you are unlucky with your allocation. I think I was experienceing this.

I didn’t look into what p2cstr does and I’m not familiar with pascal strings enough to tell you if changing it to 64 is the complete solution.

Also if there is a better place to put patches please let me know.

Ping. Is the forum the correct place to submit patches?

Also I got the diff backwards.

Nope thats great!
Thanks for posting it.
I added it to our issue tracker: http://github.com/openframeworks/openFr-…-/issue/217