search for: optarr

Displaying 4 results from an estimated 4 matches for "optarr".

Did you mean: optarg
2013 Jan 07
1
[PATCH] drivers/xen: avoid out-of-range write in xen_add_device
On Sat, Jan 05, 2013 at 02:18:46PM -0500, Nickolai Zeldovich wrote: > xen_add_device() in drivers/xen/pci.c allocates a struct > physdev_pci_device_add on the stack and then writes to optarr[0]. > The previous declaration of struct physdev_pci_device_add contained > a zero-length optarr[] array, presumably assuming it will be allocated > with kmalloc with a suitable number of trailing elements, but the code in > xen_add_device() as a result wrote past the end of the (stack-...
2013 Jan 07
1
[PATCH] drivers/xen: avoid out-of-range write in xen_add_device
On Sat, Jan 05, 2013 at 02:18:46PM -0500, Nickolai Zeldovich wrote: > xen_add_device() in drivers/xen/pci.c allocates a struct > physdev_pci_device_add on the stack and then writes to optarr[0]. > The previous declaration of struct physdev_pci_device_add contained > a zero-length optarr[] array, presumably assuming it will be allocated > with kmalloc with a suitable number of trailing elements, but the code in > xen_add_device() as a result wrote past the end of the (stack-...
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...Working Directory string */ -void rosh_cfg(const char *cmdstr, const char *pwdstr) +void rosh_cfg() { - ROSH_DEBUG("CMD: '%s'\npwd: '%s'\n", cmdstr, pwdstr); printf("CFG: '%s'\n", syslinux_config_file()); } /* rosh_cfg */ +/* Process optstr to optarr + * optstr option string to process + * optarr option array to populate + */ +void rosh_ls_arg_opt(const char *optstr, int *optarr) +{ + char *cpos; + cpos = strchr(optstr, 'l'); + if (cpos) { + optarr[0] = cpos - optstr; + } else { + optarr[0] = -1; + } + cpos = strchr(optstr, 'F'...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...ctory string */ -void rosh_cfg(const char *cmdstr, const char *pwdstr) +void rosh_cfg(void) { - ROSH_DEBUG("CMD: '%s'\npwd: '%s'\n", cmdstr, pwdstr); printf("CFG: '%s'\n", syslinux_config_file()); } /* rosh_cfg */ +/* Process optstr to optarr + * optstr option string to process + * optarr option array to populate + */ +void rosh_ls_arg_opt(const char *optstr, int *optarr) +{ + char *cpos; + cpos = strchr(optstr, 'l'); + if (cpos) { + optarr[0] = cpos - optstr; + } else { + optarr[0] = -1; + } + cpos = strchr(op...