-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
>> Also, PATH_MAX does not seem to always hold what it promises, >> see >> http://insanecoding.blogspot.de/2007/11/pathmax-simply-isnt.html > > Yes, but I'm working on the assumption that people want to actually > use their devices; so paths larger than 4096 are unlikely. As long > as the programs don't suffer from buffer overflows everything > should be OK! > > The sensible solution would be to malloc() whatever's necessary, > that would solve everything; I might just do that instead... Is there any reason not to do this? const char *device_file_name = "/dev/input/event0"; and then, in the argument parsing loop device_file_name = argv[i]; argv is on the main thread's stack, so it should be safe to use as long as the program runs. And that variable is only read from, never written to. So there's actually no reason to make a copy at all. Kind regards, Ralf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRhUA1AAoJEEAdTZ0mjB1Wet0IALvGEpNgcByt2kS5Vbq81QN6 3qyFSLpqnAfghIs+0vlwRy8bNgx58BD+3tsWklWI43pX5GFrgwPFt9/7lXPz4hMG 9Inug/hmsU9TsCKxQJibZaC3CZuEx4PAi/NOgnw/111m/KjHo2QAXRIzu76Arzg5 ye6QpyY96o3otYN98P9ttxt9JlfPZAbeFR8C2qcsT7iTAgczJsA6UJGpwIsHjPbQ 2Ikki922bGHzxMFdxb3ykMKJhon6+s19KsBTMLZZ+pgJxnJvZb2bo3+mz2PHM3tk 1j1k5cv4rordJ6k7NxfKMAh8DnAKCG29s9pK80Npz+qg5ym9wFu7kovvd1rvQ0w= =gNm9 -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org