diff options
author | Keith Packard <keithp@keithp.com> | 2011-08-13 18:33:07 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-13 18:44:26 -0700 |
commit | 313d740b5284b24f1cc7a1ba5779136b55d49ebe (patch) | |
tree | ae74e0f6cc8a9be21c5da13b749466ebac3b943c /altosui | |
parent | 3b87dd6f46922cf5f98deb2dffa2148c4244e48e (diff) |
libaltos: Mis-allocated device list in libaltos
Would overrun mis-allocated array, causing chaos.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui')
-rw-r--r-- | altosui/libaltos/libaltos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/altosui/libaltos/libaltos.c b/altosui/libaltos/libaltos.c index 00a75de9..f2c8bd8d 100644 --- a/altosui/libaltos/libaltos.c +++ b/altosui/libaltos/libaltos.c @@ -559,7 +559,7 @@ altos_list_start(void) if (USB_IS_ALTUSMETRUM(dev->idVendor, dev->idProduct)) { if (devs->dev) devs->dev = realloc(devs->dev, - devs->ndev + 1 * sizeof (struct usbdev *)); + (devs->ndev + 1) * sizeof (struct usbdev *)); else devs->dev = malloc (sizeof (struct usbdev *)); devs->dev[devs->ndev++] = dev; |