[lcdproc] Bug: Framebuffer Allocation

David Douthitt n9ubh@callsign.net
Thu, 27 Sep 2001 19:43:37 -0400


In the original LCDd (in lcd.c) the framebuffer is allocated before the
driver's init routines are called.

Some drivers would fail if the framebuffer was not allocated; others
ignored it.

Only one did the "right" thing: it freed the framebuffer and reallocated
it, because the framebuffer was the wrong size.

As far as I know, almost all drivers had adjustable sizes: just give it
a 20x6 display and you've got a SegFault - as the framebuffer clear
routine clears away more than just the 80 character (20x4) frame buffer.

I've "fixed" all of the drivers except the aforementioned correctly
working one.  Now lcd.c will allocate a framebuffer if it does not exist
after driver initialization.

Best practice: a driver should allocate the framebuffer in the size it
wants.  This would be a good routine for the "library" I was talking
about: lcd_lib_allocate_framebuf() or something like that.


-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe@lists.omnipotent.net