From: Noah M. <the...@gm...> - 2007-07-25 22:46:20
|
On 7/25/07, Paul Bender pebender-at-san.rr.com |lirc| <i9i...@sn...> wrote: > 1fx...@sn... wrote: > > Hey all, > > > > I did a little debugging over the weekend and discovered that the > > kernel developers changed the buffer size for the name field in struct > > i2c_client to 20 characters instead of 50. This breaks the lirc_i2c > > driver when used on a Hauppauge PVR150, whose struct i2c_client > > receives the 21-character string "Hauppauge IR (PVR150)". Attached is > > a patch file that shortens the string to fit in the newly resized > > buffer. > > > > --Noah > > Is there any reason not to change the strcpy calls to snprintf calls > with IC2_NAME_SIZE as the length so that this buffer overflow does not > happen in the future? > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > There is no reason, this was just the first (admittedly stopgap) solution that came to mind. If the devs have a better fix, I'm all for it. --Noah |