idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
43,900 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb,
unsigned int buffer_length)
{
usb_free_coherent(umidi->dev, buffer_length,
urb->transfer_buffer, urb->transfer_dma);
usb_free_urb(urb);
}
| DoS | 0 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb,
unsigned int buffer_length)
{
usb_free_coherent(umidi->dev, buffer_length,
urb->transfer_buffer, urb->transfer_dma);
usb_free_urb(urb);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,901 | static int roland_load_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{
value->value.enumerated.item[0] = kcontrol->private_value;
return 0;
}
| DoS | 0 | static int roland_load_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{
value->value.enumerated.item[0] = kcontrol->private_value;
return 0;
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,902 | static int roland_load_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{
struct snd_usb_midi *umidi = kcontrol->private_data;
int changed;
if (value->value.enumerated.item[0] > 1)
return -EINVAL;
mutex_lock(&umidi->mutex);
changed = value->value.enumerated.item[0] != kcontrol->private... | DoS | 0 | static int roland_load_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{
struct snd_usb_midi *umidi = kcontrol->private_data;
int changed;
if (value->value.enumerated.item[0] > 1)
return -EINVAL;
mutex_lock(&umidi->mutex);
changed = value->value.enumerated.item[0] != kcontrol->private... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,903 | static int send_bulk_static_data(struct snd_usb_midi_out_endpoint *ep,
const void *data, int len)
{
int err = 0;
void *buf = kmemdup(data, len, GFP_KERNEL);
if (!buf)
return -ENOMEM;
dump_urb("sending", buf, len);
if (ep->urbs[0].urb)
err = usb_bulk_msg(ep->umidi->dev, ep->urbs[0].urb->pipe,
buf, l... | DoS | 0 | static int send_bulk_static_data(struct snd_usb_midi_out_endpoint *ep,
const void *data, int len)
{
int err = 0;
void *buf = kmemdup(data, len, GFP_KERNEL);
if (!buf)
return -ENOMEM;
dump_urb("sending", buf, len);
if (ep->urbs[0].urb)
err = usb_bulk_msg(ep->umidi->dev, ep->urbs[0].urb->pipe,
buf, l... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,904 | static void snd_usbmidi_akai_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
unsigned int pos = 0;
unsigned int len = (unsigned int)buffer_length;
while (pos < len) {
unsigned int port = (buffer[pos] >> 4) - 1;
unsigned int msg_len = buffer[pos] & 0x0f;
pos++;
if (pos ... | DoS | 0 | static void snd_usbmidi_akai_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
unsigned int pos = 0;
unsigned int len = (unsigned int)buffer_length;
while (pos < len) {
unsigned int port = (buffer[pos] >> 4) - 1;
unsigned int msg_len = buffer[pos] & 0x0f;
pos++;
if (pos ... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,905 | static void snd_usbmidi_akai_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
uint8_t *msg;
int pos, end, count, buf_end;
uint8_t tmp[MAX_AKAI_SYSEX_LEN];
struct snd_rawmidi_substream *substream = ep->ports[0].substream;
if (!ep->ports[0].active)
return;
msg = urb->transfer_buffer + urb... | DoS | 0 | static void snd_usbmidi_akai_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
uint8_t *msg;
int pos, end, count, buf_end;
uint8_t tmp[MAX_AKAI_SYSEX_LEN];
struct snd_rawmidi_substream *substream = ep->ports[0].substream;
if (!ep->ports[0].active)
return;
msg = urb->transfer_buffer + urb... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,906 | static void snd_usbmidi_cme_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length < 2 || (buffer[0] & 0x0f) != 0x0f)
snd_usbmidi_standard_input(ep, buffer, buffer_length);
else
snd_usbmidi_input_data(ep, buffer[0] >> 4,
&buffer[1], buffer_length - 1);
... | DoS | 0 | static void snd_usbmidi_cme_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length < 2 || (buffer[0] & 0x0f) != 0x0f)
snd_usbmidi_standard_input(ep, buffer, buffer_length);
else
snd_usbmidi_input_data(ep, buffer[0] >> 4,
&buffer[1], buffer_length - 1);
... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,907 | static int snd_usbmidi_create_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoints)
{
int i, j, err;
int out_ports = 0, in_ports = 0;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
if (endpoints[i].out_cables) {
err = snd_usbmidi_out_endpoint_create(umidi,
&endpoints... | DoS | 0 | static int snd_usbmidi_create_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoints)
{
int i, j, err;
int out_ports = 0, in_ports = 0;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
if (endpoints[i].out_cables) {
err = snd_usbmidi_out_endpoint_create(umidi,
&endpoints... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,908 | static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint)
{
struct snd_usb_midi_endpoint_info ep_info;
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
struct usb_endpoint_descriptor *epd;
in... | DoS | 0 | static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint)
{
struct snd_usb_midi_endpoint_info ep_info;
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
struct usb_endpoint_descriptor *epd;
in... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,909 | static int snd_usbmidi_create_rawmidi(struct snd_usb_midi *umidi,
int out_ports, int in_ports)
{
struct snd_rawmidi *rmidi;
int err;
err = snd_rawmidi_new(umidi->card, "USB MIDI",
umidi->next_midi_device++,
out_ports, in_ports, &rmidi);
if (err < 0)
return err;
strcpy(rmidi->name, um... | DoS | 0 | static int snd_usbmidi_create_rawmidi(struct snd_usb_midi *umidi,
int out_ports, int in_ports)
{
struct snd_rawmidi *rmidi;
int err;
err = snd_rawmidi_new(umidi->card, "USB MIDI",
umidi->next_midi_device++,
out_ports, in_ports, &rmidi);
if (err < 0)
return err;
strcpy(rmidi->name, um... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,910 | static int snd_usbmidi_detect_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint,
int max_endpoints)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
struct usb_endpoint_descriptor *epd;
int i, out_eps = 0, in_eps = 0;... | DoS | 0 | static int snd_usbmidi_detect_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint,
int max_endpoints)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
struct usb_endpoint_descriptor *epd;
int i, out_eps = 0, in_eps = 0;... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,911 | static int snd_usbmidi_detect_per_port_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoints)
{
int err, i;
err = snd_usbmidi_detect_endpoints(umidi, endpoints, MIDI_MAX_ENDPOINTS);
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
if (endpoints[i].out_ep)
endpoints[i].out_cables =... | DoS | 0 | static int snd_usbmidi_detect_per_port_endpoints(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoints)
{
int err, i;
err = snd_usbmidi_detect_endpoints(umidi, endpoints, MIDI_MAX_ENDPOINTS);
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
if (endpoints[i].out_ep)
endpoints[i].out_cables =... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,912 | static int snd_usbmidi_detect_yamaha(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
uint8_t *cs_desc;
intf = umidi->iface;
if (!intf)
return -ENOENT;
hostif = intf->altse... | DoS | 0 | static int snd_usbmidi_detect_yamaha(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *endpoint)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
uint8_t *cs_desc;
intf = umidi->iface;
if (!intf)
return -ENOENT;
hostif = intf->altse... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,913 | void snd_usbmidi_disconnect(struct list_head *p)
{
struct snd_usb_midi *umidi;
unsigned int i, j;
umidi = list_entry(p, struct snd_usb_midi, list);
/*
* an URB's completion handler may start the timer and
* a timer may submit an URB. To reliably break the cycle
* a flag under lock must be used
*/
down_wri... | DoS | 0 | void snd_usbmidi_disconnect(struct list_head *p)
{
struct snd_usb_midi *umidi;
unsigned int i, j;
umidi = list_entry(p, struct snd_usb_midi, list);
/*
* an URB's completion handler may start the timer and
* a timer may submit an URB. To reliably break the cycle
* a flag under lock must be used
*/
down_wri... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,914 | static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep)
{
unsigned int urb_index;
struct urb *urb;
unsigned long flags;
spin_lock_irqsave(&ep->buffer_lock, flags);
if (ep->umidi->disconnected) {
spin_unlock_irqrestore(&ep->buffer_lock, flags);
return;
}
urb_index = ep->next_urb;
for (;;) {... | DoS | 0 | static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep)
{
unsigned int urb_index;
struct urb *urb;
unsigned long flags;
spin_lock_irqsave(&ep->buffer_lock, flags);
if (ep->umidi->disconnected) {
spin_unlock_irqrestore(&ep->buffer_lock, flags);
return;
}
urb_index = ep->next_urb;
for (;;) {... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,915 | static void snd_usbmidi_emagic_init_out(struct snd_usb_midi_out_endpoint *ep)
{
static const u8 init_data[] = {
/* initialization magic: "get version" */
0xf0,
0x00, 0x20, 0x31, /* Emagic */
0x64, /* Unitor8 */
0x0b, /* version number request */
0x00, /* command version */
0x00, /* EEPROM, box 0 ... | DoS | 0 | static void snd_usbmidi_emagic_init_out(struct snd_usb_midi_out_endpoint *ep)
{
static const u8 init_data[] = {
/* initialization magic: "get version" */
0xf0,
0x00, 0x20, 0x31, /* Emagic */
0x64, /* Unitor8 */
0x0b, /* version number request */
0x00, /* command version */
0x00, /* EEPROM, box 0 ... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,916 | static void snd_usbmidi_emagic_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
/* FF indicates end of valid data */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xff) {
buffer_length = i;
break;
}
/* handle F5 at end of last buffer */
if (ep->see... | DoS | 0 | static void snd_usbmidi_emagic_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
/* FF indicates end of valid data */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xff) {
buffer_length = i;
break;
}
/* handle F5 at end of last buffer */
if (ep->see... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,917 | static void snd_usbmidi_emagic_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int port0 = ep->current_port;
uint8_t *buf = urb->transfer_buffer;
int buf_free = ep->max_transfer;
int length, i;
for (i = 0; i < 0x10; ++i) {
/* round-robin, starting at the last current port */
int port... | DoS | 0 | static void snd_usbmidi_emagic_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int port0 = ep->current_port;
uint8_t *buf = urb->transfer_buffer;
int buf_free = ep->max_transfer;
int length, i;
for (i = 0; i < 0x10; ++i) {
/* round-robin, starting at the last current port */
int port... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,918 | static void snd_usbmidi_error_timer(unsigned long data)
{
struct snd_usb_midi *umidi = (struct snd_usb_midi *)data;
unsigned int i, j;
spin_lock(&umidi->disc_lock);
if (umidi->disconnected) {
spin_unlock(&umidi->disc_lock);
return;
}
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_in_endpoin... | DoS | 0 | static void snd_usbmidi_error_timer(unsigned long data)
{
struct snd_usb_midi *umidi = (struct snd_usb_midi *)data;
unsigned int i, j;
spin_lock(&umidi->disc_lock);
if (umidi->disconnected) {
spin_unlock(&umidi->disc_lock);
return;
}
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_in_endpoin... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,919 | static void snd_usbmidi_free(struct snd_usb_midi *umidi)
{
int i;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
if (ep->out)
snd_usbmidi_out_endpoint_delete(ep->out);
if (ep->in)
snd_usbmidi_in_endpoint_delete(ep->in);
}
mutex_destroy(&umidi->mutex)... | DoS | 0 | static void snd_usbmidi_free(struct snd_usb_midi *umidi)
{
int i;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
if (ep->out)
snd_usbmidi_out_endpoint_delete(ep->out);
if (ep->in)
snd_usbmidi_in_endpoint_delete(ep->in);
}
mutex_destroy(&umidi->mutex)... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,920 | static void snd_usbmidi_ftdi_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length > 2)
snd_usbmidi_input_data(ep, 0, buffer + 2, buffer_length - 2);
}
| DoS | 0 | static void snd_usbmidi_ftdi_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length > 2)
snd_usbmidi_input_data(ep, 0, buffer + 2, buffer_length - 2);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,921 | static void snd_usbmidi_get_port_info(struct snd_rawmidi *rmidi, int number,
struct snd_seq_port_info *seq_port_info)
{
struct snd_usb_midi *umidi = rmidi->private_data;
struct port_info *port_info;
/* TODO: read port flags from descriptors */
port_info = find_port_info(umidi, number);
if (port_info) {
... | DoS | 0 | static void snd_usbmidi_get_port_info(struct snd_rawmidi *rmidi, int number,
struct snd_seq_port_info *seq_port_info)
{
struct snd_usb_midi *umidi = rmidi->private_data;
struct port_info *port_info;
/* TODO: read port flags from descriptors */
port_info = find_port_info(umidi, number);
if (port_info) {
... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,922 | static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *ep_info,
struct snd_usb_midi_endpoint *rep)
{
struct snd_usb_midi_in_endpoint *ep;
void *buffer;
unsigned int pipe;
int length;
unsigned int i;
rep->in = NULL;
ep = kzalloc(sizeof(*ep), GFP_KER... | DoS | 0 | static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *ep_info,
struct snd_usb_midi_endpoint *rep)
{
struct snd_usb_midi_in_endpoint *ep;
void *buffer;
unsigned int pipe;
int length;
unsigned int i;
rep->in = NULL;
ep = kzalloc(sizeof(*ep), GFP_KER... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,923 | static void snd_usbmidi_in_endpoint_delete(struct snd_usb_midi_in_endpoint *ep)
{
unsigned int i;
for (i = 0; i < INPUT_URBS; ++i)
if (ep->urbs[i])
free_urb_and_buffer(ep->umidi, ep->urbs[i],
ep->urbs[i]->transfer_buffer_length);
kfree(ep);
}
| DoS | 0 | static void snd_usbmidi_in_endpoint_delete(struct snd_usb_midi_in_endpoint *ep)
{
unsigned int i;
for (i = 0; i < INPUT_URBS; ++i)
if (ep->urbs[i])
free_urb_and_buffer(ep->umidi, ep->urbs[i],
ep->urbs[i]->transfer_buffer_length);
kfree(ep);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,924 | static void snd_usbmidi_init_substream(struct snd_usb_midi *umidi,
int stream, int number,
struct snd_rawmidi_substream **rsubstream)
{
struct port_info *port_info;
const char *name_format;
struct snd_rawmidi_substream *substream =
snd_usbmidi_find_substream(umidi, stream, number);
if (!sub... | DoS | 0 | static void snd_usbmidi_init_substream(struct snd_usb_midi *umidi,
int stream, int number,
struct snd_rawmidi_substream **rsubstream)
{
struct port_info *port_info;
const char *name_format;
struct snd_rawmidi_substream *substream =
snd_usbmidi_find_substream(umidi, stream, number);
if (!sub... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,925 | static int snd_usbmidi_input_close(struct snd_rawmidi_substream *substream)
{
return substream_open(substream, 1, 0);
}
| DoS | 0 | static int snd_usbmidi_input_close(struct snd_rawmidi_substream *substream)
{
return substream_open(substream, 1, 0);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,926 | static void snd_usbmidi_input_data(struct snd_usb_midi_in_endpoint *ep,
int portidx, uint8_t *data, int length)
{
struct usbmidi_in_port *port = &ep->ports[portidx];
if (!port->substream) {
dev_dbg(&ep->umidi->dev->dev, "unexpected port %d!\n", portidx);
return;
}
if (!test_bit(port->substream->number, ... | DoS | 0 | static void snd_usbmidi_input_data(struct snd_usb_midi_in_endpoint *ep,
int portidx, uint8_t *data, int length)
{
struct usbmidi_in_port *port = &ep->ports[portidx];
if (!port->substream) {
dev_dbg(&ep->umidi->dev->dev, "unexpected port %d!\n", portidx);
return;
}
if (!test_bit(port->substream->number, ... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,927 | static int snd_usbmidi_input_open(struct snd_rawmidi_substream *substream)
{
return substream_open(substream, 1, 1);
}
| DoS | 0 | static int snd_usbmidi_input_open(struct snd_rawmidi_substream *substream)
{
return substream_open(substream, 1, 1);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,928 | void snd_usbmidi_input_start(struct list_head *p)
{
struct snd_usb_midi *umidi;
int i;
umidi = list_entry(p, struct snd_usb_midi, list);
if (umidi->input_running || !umidi->opened[1])
return;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
snd_usbmidi_input_start_ep(umidi->endpoints[i].in);
umidi->input_running = 1... | DoS | 0 | void snd_usbmidi_input_start(struct list_head *p)
{
struct snd_usb_midi *umidi;
int i;
umidi = list_entry(p, struct snd_usb_midi, list);
if (umidi->input_running || !umidi->opened[1])
return;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
snd_usbmidi_input_start_ep(umidi->endpoints[i].in);
umidi->input_running = 1... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,929 | static void snd_usbmidi_input_start_ep(struct snd_usb_midi_in_endpoint *ep)
{
unsigned int i;
if (!ep)
return;
for (i = 0; i < INPUT_URBS; ++i) {
struct urb *urb = ep->urbs[i];
urb->dev = ep->umidi->dev;
snd_usbmidi_submit_urb(urb, GFP_KERNEL);
}
}
| DoS | 0 | static void snd_usbmidi_input_start_ep(struct snd_usb_midi_in_endpoint *ep)
{
unsigned int i;
if (!ep)
return;
for (i = 0; i < INPUT_URBS; ++i) {
struct urb *urb = ep->urbs[i];
urb->dev = ep->umidi->dev;
snd_usbmidi_submit_urb(urb, GFP_KERNEL);
}
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,930 | void snd_usbmidi_input_stop(struct list_head *p)
{
struct snd_usb_midi *umidi;
unsigned int i, j;
umidi = list_entry(p, struct snd_usb_midi, list);
if (!umidi->input_running)
return;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
if (ep->in)
for (j = 0... | DoS | 0 | void snd_usbmidi_input_stop(struct list_head *p)
{
struct snd_usb_midi *umidi;
unsigned int i, j;
umidi = list_entry(p, struct snd_usb_midi, list);
if (!umidi->input_running)
return;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
if (ep->in)
for (j = 0... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,931 | static void snd_usbmidi_maudio_broken_running_status_input(
struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i] != 0) {
int cable = buffer[i] >> 4;
u8 cin = buffer[i] & 0x0f;
struct usbmidi_in_port *port = &ep... | DoS | 0 | static void snd_usbmidi_maudio_broken_running_status_input(
struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i] != 0) {
int cable = buffer[i] >> 4;
u8 cin = buffer[i] & 0x0f;
struct usbmidi_in_port *port = &ep... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,932 | static void snd_usbmidi_midiman_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i + 3] != 0) {
int port = buffer[i + 3] >> 4;
int length = buffer[i + 3] & 3;
snd_usbmidi_input_data(ep, port, &buffer[i],... | DoS | 0 | static void snd_usbmidi_midiman_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i + 3] != 0) {
int port = buffer[i + 3] >> 4;
int length = buffer[i + 3] & 3;
snd_usbmidi_input_data(ep, port, &buffer[i],... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,933 | static void snd_usbmidi_novation_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length < 2 || !buffer[0] || buffer_length < buffer[0] + 1)
return;
snd_usbmidi_input_data(ep, 0, &buffer[2], buffer[0] - 1);
}
| DoS | 0 | static void snd_usbmidi_novation_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length < 2 || !buffer[0] || buffer_length < buffer[0] + 1)
return;
snd_usbmidi_input_data(ep, 0, &buffer[2], buffer[0] - 1);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,934 | static void snd_usbmidi_novation_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
uint8_t *transfer_buffer;
int count;
if (!ep->ports[0].active)
return;
transfer_buffer = urb->transfer_buffer;
count = snd_rawmidi_transmit(ep->ports[0].substream,
&transfer_buffer[2],
ep->max... | DoS | 0 | static void snd_usbmidi_novation_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
uint8_t *transfer_buffer;
int count;
if (!ep->ports[0].active)
return;
transfer_buffer = urb->transfer_buffer;
count = snd_rawmidi_transmit(ep->ports[0].substream,
&transfer_buffer[2],
ep->max... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,935 | static void snd_usbmidi_out_endpoint_clear(struct snd_usb_midi_out_endpoint *ep)
{
unsigned int i;
for (i = 0; i < OUTPUT_URBS; ++i)
if (ep->urbs[i].urb) {
free_urb_and_buffer(ep->umidi, ep->urbs[i].urb,
ep->max_transfer);
ep->urbs[i].urb = NULL;
}
}
| DoS | 0 | static void snd_usbmidi_out_endpoint_clear(struct snd_usb_midi_out_endpoint *ep)
{
unsigned int i;
for (i = 0; i < OUTPUT_URBS; ++i)
if (ep->urbs[i].urb) {
free_urb_and_buffer(ep->umidi, ep->urbs[i].urb,
ep->max_transfer);
ep->urbs[i].urb = NULL;
}
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,936 | static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *ep_info,
struct snd_usb_midi_endpoint *rep)
{
struct snd_usb_midi_out_endpoint *ep;
unsigned int i;
unsigned int pipe;
void *buffer;
rep->out = NULL;
ep = kzalloc(sizeof(*ep), GFP_KERNEL);
i... | DoS | 0 | static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
struct snd_usb_midi_endpoint_info *ep_info,
struct snd_usb_midi_endpoint *rep)
{
struct snd_usb_midi_out_endpoint *ep;
unsigned int i;
unsigned int pipe;
void *buffer;
rep->out = NULL;
ep = kzalloc(sizeof(*ep), GFP_KERNEL);
i... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,937 | static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint *ep)
{
snd_usbmidi_out_endpoint_clear(ep);
kfree(ep);
}
| DoS | 0 | static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint *ep)
{
snd_usbmidi_out_endpoint_clear(ep);
kfree(ep);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,938 | static void snd_usbmidi_out_tasklet(unsigned long data)
{
struct snd_usb_midi_out_endpoint *ep =
(struct snd_usb_midi_out_endpoint *) data;
snd_usbmidi_do_output(ep);
}
| DoS | 0 | static void snd_usbmidi_out_tasklet(unsigned long data)
{
struct snd_usb_midi_out_endpoint *ep =
(struct snd_usb_midi_out_endpoint *) data;
snd_usbmidi_do_output(ep);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,939 | static void snd_usbmidi_output_drain(struct snd_rawmidi_substream *substream)
{
struct usbmidi_out_port *port = substream->runtime->private_data;
struct snd_usb_midi_out_endpoint *ep = port->ep;
unsigned int drain_urbs;
DEFINE_WAIT(wait);
long timeout = msecs_to_jiffies(50);
if (ep->umidi->disconnected)
return... | DoS | 0 | static void snd_usbmidi_output_drain(struct snd_rawmidi_substream *substream)
{
struct usbmidi_out_port *port = substream->runtime->private_data;
struct snd_usb_midi_out_endpoint *ep = port->ep;
unsigned int drain_urbs;
DEFINE_WAIT(wait);
long timeout = msecs_to_jiffies(50);
if (ep->umidi->disconnected)
return... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,940 | static void snd_usbmidi_output_trigger(struct snd_rawmidi_substream *substream,
int up)
{
struct usbmidi_out_port *port =
(struct usbmidi_out_port *)substream->runtime->private_data;
port->active = up;
if (up) {
if (port->ep->umidi->disconnected) {
/* gobble up remaining bytes to prevent wait in
... | DoS | 0 | static void snd_usbmidi_output_trigger(struct snd_rawmidi_substream *substream,
int up)
{
struct usbmidi_out_port *port =
(struct usbmidi_out_port *)substream->runtime->private_data;
port->active = up;
if (up) {
if (port->ep->umidi->disconnected) {
/* gobble up remaining bytes to prevent wait in
... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,941 | static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
snd_usbmidi_input_data(ep, 0, buffer, buffer_length);
}
| DoS | 0 | static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
snd_usbmidi_input_data(ep, 0, buffer, buffer_length);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,942 | static void snd_usbmidi_raw_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int count;
if (!ep->ports[0].active)
return;
count = snd_rawmidi_transmit(ep->ports[0].substream,
urb->transfer_buffer,
ep->max_transfer);
if (count < 1) {
ep->ports[0].active = 0;
return;
}
... | DoS | 0 | static void snd_usbmidi_raw_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int count;
if (!ep->ports[0].active)
return;
count = snd_rawmidi_transmit(ep->ports[0].substream,
urb->transfer_buffer,
ep->max_transfer);
if (count < 1) {
ep->ports[0].active = 0;
return;
}
... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,943 | static void snd_usbmidi_rawmidi_free(struct snd_rawmidi *rmidi)
{
struct snd_usb_midi *umidi = rmidi->private_data;
snd_usbmidi_free(umidi);
}
| DoS | 0 | static void snd_usbmidi_rawmidi_free(struct snd_rawmidi *rmidi)
{
struct snd_usb_midi *umidi = rmidi->private_data;
snd_usbmidi_free(umidi);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,944 | void snd_usbmidi_resume(struct list_head *p)
{
struct snd_usb_midi *umidi;
umidi = list_entry(p, struct snd_usb_midi, list);
mutex_lock(&umidi->mutex);
snd_usbmidi_input_start(p);
mutex_unlock(&umidi->mutex);
}
| DoS | 0 | void snd_usbmidi_resume(struct list_head *p)
{
struct snd_usb_midi *umidi;
umidi = list_entry(p, struct snd_usb_midi, list);
mutex_lock(&umidi->mutex);
snd_usbmidi_input_start(p);
mutex_unlock(&umidi->mutex);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,945 | static void snd_usbmidi_standard_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i] != 0) {
int cable = buffer[i] >> 4;
int length = snd_usbmidi_cin_length[buffer[i] & 0x0f];
snd_usbmidi_input_data(ep,... | DoS | 0 | static void snd_usbmidi_standard_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i] != 0) {
int cable = buffer[i] >> 4;
int length = snd_usbmidi_cin_length[buffer[i] & 0x0f];
snd_usbmidi_input_data(ep,... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,946 | static void snd_usbmidi_standard_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int p;
/* FIXME: lower-numbered ports can starve higher-numbered ports */
for (p = 0; p < 0x10; ++p) {
struct usbmidi_out_port *port = &ep->ports[p];
if (!port->active)
continue;
while (urb->transfer_buffe... | DoS | 0 | static void snd_usbmidi_standard_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int p;
/* FIXME: lower-numbered ports can starve higher-numbered ports */
for (p = 0; p < 0x10; ++p) {
struct usbmidi_out_port *port = &ep->ports[p];
if (!port->active)
continue;
while (urb->transfer_buffe... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,947 | void snd_usbmidi_suspend(struct list_head *p)
{
struct snd_usb_midi *umidi;
umidi = list_entry(p, struct snd_usb_midi, list);
mutex_lock(&umidi->mutex);
snd_usbmidi_input_stop(p);
mutex_unlock(&umidi->mutex);
}
| DoS | 0 | void snd_usbmidi_suspend(struct list_head *p)
{
struct snd_usb_midi *umidi;
umidi = list_entry(p, struct snd_usb_midi, list);
mutex_lock(&umidi->mutex);
snd_usbmidi_input_stop(p);
mutex_unlock(&umidi->mutex);
}
| @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,948 | static void snd_usbmidi_switch_roland_altsetting(struct snd_usb_midi *umidi)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
intf = umidi->iface;
if (!intf || intf->num_altsetting != 2)
return;
hostif = &intf->altsetting[1];
intfd = get_iface_desc(host... | DoS | 0 | static void snd_usbmidi_switch_roland_altsetting(struct snd_usb_midi *umidi)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
intf = umidi->iface;
if (!intf || intf->num_altsetting != 2)
return;
hostif = &intf->altsetting[1];
intfd = get_iface_desc(host... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,949 | static void snd_usbmidi_transmit_byte(struct usbmidi_out_port *port,
uint8_t b, struct urb *urb)
{
uint8_t p0 = port->cable;
void (*output_packet)(struct urb*, uint8_t, uint8_t, uint8_t, uint8_t) =
port->ep->umidi->usb_protocol_ops->output_packet;
if (b >= 0xf8) {
output_packet(urb, p0 | 0x0f, b, 0, 0... | DoS | 0 | static void snd_usbmidi_transmit_byte(struct usbmidi_out_port *port,
uint8_t b, struct urb *urb)
{
uint8_t p0 = port->cable;
void (*output_packet)(struct urb*, uint8_t, uint8_t, uint8_t, uint8_t) =
port->ep->umidi->usb_protocol_ops->output_packet;
if (b >= 0xf8) {
output_packet(urb, p0 | 0x0f, b, 0, 0... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,950 | static void snd_usbmidi_us122l_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length != 9)
return;
buffer_length = 8;
while (buffer_length && buffer[buffer_length - 1] == 0xFD)
buffer_length--;
if (buffer_length)
snd_usbmidi_input_data(ep, 0, buffer, buffe... | DoS | 0 | static void snd_usbmidi_us122l_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
if (buffer_length != 9)
return;
buffer_length = 8;
while (buffer_length && buffer[buffer_length - 1] == 0xFD)
buffer_length--;
if (buffer_length)
snd_usbmidi_input_data(ep, 0, buffer, buffe... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,951 | static int substream_open(struct snd_rawmidi_substream *substream, int dir,
int open)
{
struct snd_usb_midi *umidi = substream->rmidi->private_data;
struct snd_kcontrol *ctl;
down_read(&umidi->disc_rwsem);
if (umidi->disconnected) {
up_read(&umidi->disc_rwsem);
return open ? -ENODEV : 0;
}
mutex_lock(&... | DoS | 0 | static int substream_open(struct snd_rawmidi_substream *substream, int dir,
int open)
{
struct snd_usb_midi *umidi = substream->rmidi->private_data;
struct snd_kcontrol *ctl;
down_read(&umidi->disc_rwsem);
if (umidi->disconnected) {
up_read(&umidi->disc_rwsem);
return open ? -ENODEV : 0;
}
mutex_lock(&... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,952 | static void update_roland_altsetting(struct snd_usb_midi *umidi)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
int is_light_load;
intf = umidi->iface;
is_light_load = intf->cur_altsetting != intf->altsetting;
if (umidi->roland_load_ctl->private_value ==... | DoS | 0 | static void update_roland_altsetting(struct snd_usb_midi *umidi)
{
struct usb_interface *intf;
struct usb_host_interface *hostif;
struct usb_interface_descriptor *intfd;
int is_light_load;
intf = umidi->iface;
is_light_load = intf->cur_altsetting != intf->altsetting;
if (umidi->roland_load_ctl->private_value ==... | @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
- snd_usbmidi_free(umidi);
return err;
}
| null | null | null |
43,953 | static int check_func_arg(struct verifier_env *env, u32 regno,
enum bpf_arg_type arg_type, struct bpf_map **mapp)
{
struct reg_state *reg = env->cur_state.regs + regno;
enum bpf_reg_type expected_type;
int err = 0;
if (arg_type == ARG_DONTCARE)
return 0;
if (reg->type == NOT_INIT) {
verbose("R%d !read_o... | +Info | 0 | static int check_func_arg(struct verifier_env *env, u32 regno,
enum bpf_arg_type arg_type, struct bpf_map **mapp)
{
struct reg_state *reg = env->cur_state.regs + regno;
enum bpf_reg_type expected_type;
int err = 0;
if (arg_type == ARG_DONTCARE)
return 0;
if (reg->type == NOT_INIT) {
verbose("R%d !read_o... | @@ -2082,7 +2082,7 @@ static void adjust_branches(struct bpf_prog *prog, int pos, int delta)
/* adjust offset of jmps if necessary */
if (i < pos && i + insn->off + 1 > pos)
insn->off += delta;
- else if (i > pos && i + insn->off + 1 < pos)
+ else if (i > pos + delta && i + insn->off + 1 <= pos + delta)
... | CWE-200 | null | null |
43,954 | static int check_map_func_compatibility(struct bpf_map *map, int func_id)
{
bool bool_map, bool_func;
int i;
if (!map)
return 0;
for (i = 0; i < ARRAY_SIZE(func_limit); i++) {
bool_map = (map->map_type == func_limit[i].map_type);
bool_func = (func_id == func_limit[i].func_id);
/* only when map & func pair... | +Info | 0 | static int check_map_func_compatibility(struct bpf_map *map, int func_id)
{
bool bool_map, bool_func;
int i;
if (!map)
return 0;
for (i = 0; i < ARRAY_SIZE(func_limit); i++) {
bool_map = (map->map_type == func_limit[i].map_type);
bool_func = (func_id == func_limit[i].func_id);
/* only when map & func pair... | @@ -2082,7 +2082,7 @@ static void adjust_branches(struct bpf_prog *prog, int pos, int delta)
/* adjust offset of jmps if necessary */
if (i < pos && i + insn->off + 1 > pos)
insn->off += delta;
- else if (i > pos && i + insn->off + 1 < pos)
+ else if (i > pos + delta && i + insn->off + 1 <= pos + delta)
... | CWE-200 | null | null |
43,955 | static int replace_map_fd_with_map_ptr(struct verifier_env *env)
{
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX &&
(BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
verbose("BPF_LDX ... | +Info | 0 | static int replace_map_fd_with_map_ptr(struct verifier_env *env)
{
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX &&
(BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
verbose("BPF_LDX ... | @@ -2082,7 +2082,7 @@ static void adjust_branches(struct bpf_prog *prog, int pos, int delta)
/* adjust offset of jmps if necessary */
if (i < pos && i + insn->off + 1 > pos)
insn->off += delta;
- else if (i > pos && i + insn->off + 1 < pos)
+ else if (i > pos + delta && i + insn->off + 1 <= pos + delta)
... | CWE-200 | null | null |
43,956 | static void add_descendants_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
int add_to_order = 1;
while (e) {
if (add_to_order) {
struct object_entry *s;
/* add this node... */
add_to_write_order(wo, endp, e);
/* all its siblings... */
for (s = e... | Exec Code Overflow | 0 | static void add_descendants_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
int add_to_order = 1;
while (e) {
if (add_to_order) {
struct object_entry *s;
/* add this node... */
add_to_write_order(wo, endp, e);
/* all its siblings... */
for (s = e... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,957 | static void add_family_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
struct object_entry *root;
for (root = e; root->delta; root = root->delta)
; /* nothing */
add_descendants_to_write_order(wo, endp, root);
}
| Exec Code Overflow | 0 | static void add_family_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
struct object_entry *root;
for (root = e; root->delta; root = root->delta)
; /* nothing */
add_descendants_to_write_order(wo, endp, root);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,958 | static int add_object_entry_from_bitmap(const unsigned char *sha1,
enum object_type type,
int flags, uint32_t name_hash,
struct packed_git *pack, off_t offset)
{
uint32_t index_pos;
if (have_duplicate_entry(sha1, 0, &index_pos))
return 0;
create_object_entry(sha1, type, name_hash, 0, 0, index_pos,... | Exec Code Overflow | 0 | static int add_object_entry_from_bitmap(const unsigned char *sha1,
enum object_type type,
int flags, uint32_t name_hash,
struct packed_git *pack, off_t offset)
{
uint32_t index_pos;
if (have_duplicate_entry(sha1, 0, &index_pos))
return 0;
create_object_entry(sha1, type, name_hash, 0, 0, index_pos,... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,959 | static void add_objects_in_unpacked_packs(struct rev_info *revs)
{
struct packed_git *p;
struct in_pack in_pack;
uint32_t i;
memset(&in_pack, 0, sizeof(in_pack));
for (p = packed_git; p; p = p->next) {
const unsigned char *sha1;
struct object *o;
if (!p->pack_local || p->pack_keep)
continue;
if (open... | Exec Code Overflow | 0 | static void add_objects_in_unpacked_packs(struct rev_info *revs)
{
struct packed_git *p;
struct in_pack in_pack;
uint32_t i;
memset(&in_pack, 0, sizeof(in_pack));
for (p = packed_git; p; p = p->next) {
const unsigned char *sha1;
struct object *o;
if (!p->pack_local || p->pack_keep)
continue;
if (open... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,960 | static void add_pbase_object(struct tree_desc *tree,
const char *name,
int cmplen,
const char *fullname)
{
struct name_entry entry;
int cmp;
while (tree_entry(tree,&entry)) {
if (S_ISGITLINK(entry.mode))
continue;
cmp = tree_entry_len(&entry) != cmplen ? 1 :
memcmp(name, entry... | Exec Code Overflow | 0 | static void add_pbase_object(struct tree_desc *tree,
const char *name,
int cmplen,
const char *fullname)
{
struct name_entry entry;
int cmp;
while (tree_entry(tree,&entry)) {
if (S_ISGITLINK(entry.mode))
continue;
cmp = tree_entry_len(&entry) != cmplen ? 1 :
memcmp(name, entry... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,961 | static void add_preferred_base(unsigned char *sha1)
{
struct pbase_tree *it;
void *data;
unsigned long size;
unsigned char tree_sha1[20];
if (window <= num_preferred_base++)
return;
data = read_object_with_reference(sha1, tree_type, &size, tree_sha1);
if (!data)
return;
for (it = pbase_tree; it; it = it-... | Exec Code Overflow | 0 | static void add_preferred_base(unsigned char *sha1)
{
struct pbase_tree *it;
void *data;
unsigned long size;
unsigned char tree_sha1[20];
if (window <= num_preferred_base++)
return;
data = read_object_with_reference(sha1, tree_type, &size, tree_sha1);
if (!data)
return;
for (it = pbase_tree; it; it = it-... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,962 | static inline void add_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
if (e->filled)
return;
wo[(*endp)++] = e;
e->filled = 1;
}
| Exec Code Overflow | 0 | static inline void add_to_write_order(struct object_entry **wo,
unsigned int *endp,
struct object_entry *e)
{
if (e->filled)
return;
wo[(*endp)++] = e;
e->filled = 1;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,963 | static unsigned int check_delta_limit(struct object_entry *me, unsigned int n)
{
struct object_entry *child = me->delta_child;
unsigned int m = n;
while (child) {
unsigned int c = check_delta_limit(child, n + 1);
if (m < c)
m = c;
child = child->delta_sibling;
}
return m;
}
| Exec Code Overflow | 0 | static unsigned int check_delta_limit(struct object_entry *me, unsigned int n)
{
struct object_entry *child = me->delta_child;
unsigned int m = n;
while (child) {
unsigned int c = check_delta_limit(child, n + 1);
if (m < c)
m = c;
child = child->delta_sibling;
}
return m;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,964 | static void check_object(struct object_entry *entry)
{
if (entry->in_pack) {
struct packed_git *p = entry->in_pack;
struct pack_window *w_curs = NULL;
const unsigned char *base_ref = NULL;
struct object_entry *base_entry;
unsigned long used, used_0;
unsigned long avail;
off_t ofs;
unsigned char *buf, c... | Exec Code Overflow | 0 | static void check_object(struct object_entry *entry)
{
if (entry->in_pack) {
struct packed_git *p = entry->in_pack;
struct pack_window *w_curs = NULL;
const unsigned char *base_ref = NULL;
struct object_entry *base_entry;
unsigned long used, used_0;
unsigned long avail;
off_t ofs;
unsigned char *buf, c... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,965 | static int check_pack_inflate(struct packed_git *p,
struct pack_window **w_curs,
off_t offset,
off_t len,
unsigned long expect)
{
git_zstream stream;
unsigned char fakebuf[4096], *in;
int st;
memset(&stream, 0, sizeof(stream));
git_inflate_init(&stream);
do {
in = use_pack(p, w_curs, offset, &stream.av... | Exec Code Overflow | 0 | static int check_pack_inflate(struct packed_git *p,
struct pack_window **w_curs,
off_t offset,
off_t len,
unsigned long expect)
{
git_zstream stream;
unsigned char fakebuf[4096], *in;
int st;
memset(&stream, 0, sizeof(stream));
git_inflate_init(&stream);
do {
in = use_pack(p, w_curs, offset, &stream.av... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,966 | static int check_pbase_path(unsigned hash)
{
int pos = (!done_pbase_paths) ? -1 : done_pbase_path_pos(hash);
if (0 <= pos)
return 1;
pos = -pos - 1;
ALLOC_GROW(done_pbase_paths,
done_pbase_paths_num + 1,
done_pbase_paths_alloc);
done_pbase_paths_num++;
if (pos < done_pbase_paths_num)
memmove(done_pb... | Exec Code Overflow | 0 | static int check_pbase_path(unsigned hash)
{
int pos = (!done_pbase_paths) ? -1 : done_pbase_path_pos(hash);
if (0 <= pos)
return 1;
pos = -pos - 1;
ALLOC_GROW(done_pbase_paths,
done_pbase_paths_num + 1,
done_pbase_paths_alloc);
done_pbase_paths_num++;
if (pos < done_pbase_paths_num)
memmove(done_pb... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,967 | static void cleanup_preferred_base(void)
{
struct pbase_tree *it;
unsigned i;
it = pbase_tree;
pbase_tree = NULL;
while (it) {
struct pbase_tree *this = it;
it = this->next;
free(this->pcache.tree_data);
free(this);
}
for (i = 0; i < ARRAY_SIZE(pbase_tree_cache); i++) {
if (!pbase_tree_cache[i])
c... | Exec Code Overflow | 0 | static void cleanup_preferred_base(void)
{
struct pbase_tree *it;
unsigned i;
it = pbase_tree;
pbase_tree = NULL;
while (it) {
struct pbase_tree *this = it;
it = this->next;
free(this->pcache.tree_data);
free(this);
}
for (i = 0; i < ARRAY_SIZE(pbase_tree_cache); i++) {
if (!pbase_tree_cache[i])
c... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,968 | int cmd_pack_objects(int argc, const char **argv, const char *prefix)
{
int use_internal_rev_list = 0;
int thin = 0;
int shallow = 0;
int all_progress_implied = 0;
struct argv_array rp = ARGV_ARRAY_INIT;
int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
int rev_list_index = 0;
struct option pack... | Exec Code Overflow | 0 | int cmd_pack_objects(int argc, const char **argv, const char *prefix)
{
int use_internal_rev_list = 0;
int thin = 0;
int shallow = 0;
int all_progress_implied = 0;
struct argv_array rp = ARGV_ARRAY_INIT;
int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
int rev_list_index = 0;
struct option pack... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,969 | static struct object_entry **compute_write_order(void)
{
unsigned int i, wo_end, last_untagged;
struct object_entry **wo = xmalloc(to_pack.nr_objects * sizeof(*wo));
struct object_entry *objects = to_pack.objects;
for (i = 0; i < to_pack.nr_objects; i++) {
objects[i].tagged = 0;
objects[i].filled = 0;
objec... | Exec Code Overflow | 0 | static struct object_entry **compute_write_order(void)
{
unsigned int i, wo_end, last_untagged;
struct object_entry **wo = xmalloc(to_pack.nr_objects * sizeof(*wo));
struct object_entry *objects = to_pack.objects;
for (i = 0; i < to_pack.nr_objects; i++) {
objects[i].tagged = 0;
objects[i].filled = 0;
objec... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,970 | static void copy_pack_data(struct sha1file *f,
struct packed_git *p,
struct pack_window **w_curs,
off_t offset,
off_t len)
{
unsigned char *in;
unsigned long avail;
while (len) {
in = use_pack(p, w_curs, offset, &avail);
if (avail > len)
avail = (unsigned long)len;
sha1write(f, in, avail);
offset... | Exec Code Overflow | 0 | static void copy_pack_data(struct sha1file *f,
struct packed_git *p,
struct pack_window **w_curs,
off_t offset,
off_t len)
{
unsigned char *in;
unsigned long avail;
while (len) {
in = use_pack(p, w_curs, offset, &avail);
if (avail > len)
avail = (unsigned long)len;
sha1write(f, in, avail);
offset... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,971 | static void create_object_entry(const unsigned char *sha1,
enum object_type type,
uint32_t hash,
int exclude,
int no_try_delta,
uint32_t index_pos,
struct packed_git *found_pack,
off_t found_offset)
{
struct object_entry *entry;
entry = packlist_alloc(&to_pack, sha1, index_pos);
entry->h... | Exec Code Overflow | 0 | static void create_object_entry(const unsigned char *sha1,
enum object_type type,
uint32_t hash,
int exclude,
int no_try_delta,
uint32_t index_pos,
struct packed_git *found_pack,
off_t found_offset)
{
struct object_entry *entry;
entry = packlist_alloc(&to_pack, sha1, index_pos);
entry->h... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,972 | static int delta_cacheable(unsigned long src_size, unsigned long trg_size,
unsigned long delta_size)
{
if (max_delta_cache_size && delta_cache_size + delta_size > max_delta_cache_size)
return 0;
if (delta_size < cache_max_small_delta_size)
return 1;
/* cache delta, if objects are large enough compared to... | Exec Code Overflow | 0 | static int delta_cacheable(unsigned long src_size, unsigned long trg_size,
unsigned long delta_size)
{
if (max_delta_cache_size && delta_cache_size + delta_size > max_delta_cache_size)
return 0;
if (delta_size < cache_max_small_delta_size)
return 1;
/* cache delta, if objects are large enough compared to... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,973 | static unsigned long do_compress(void **pptr, unsigned long size)
{
git_zstream stream;
void *in, *out;
unsigned long maxsize;
git_deflate_init(&stream, pack_compression_level);
maxsize = git_deflate_bound(&stream, size);
in = *pptr;
out = xmalloc(maxsize);
*pptr = out;
stream.next_in = in;
stream.avail_in... | Exec Code Overflow | 0 | static unsigned long do_compress(void **pptr, unsigned long size)
{
git_zstream stream;
void *in, *out;
unsigned long maxsize;
git_deflate_init(&stream, pack_compression_level);
maxsize = git_deflate_bound(&stream, size);
in = *pptr;
out = xmalloc(maxsize);
*pptr = out;
stream.next_in = in;
stream.avail_in... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,974 | static int done_pbase_path_pos(unsigned hash)
{
int lo = 0;
int hi = done_pbase_paths_num;
while (lo < hi) {
int mi = (hi + lo) / 2;
if (done_pbase_paths[mi] == hash)
return mi;
if (done_pbase_paths[mi] < hash)
hi = mi;
else
lo = mi + 1;
}
return -lo-1;
}
| Exec Code Overflow | 0 | static int done_pbase_path_pos(unsigned hash)
{
int lo = 0;
int hi = done_pbase_paths_num;
while (lo < hi) {
int mi = (hi + lo) / 2;
if (done_pbase_paths[mi] == hash)
return mi;
if (done_pbase_paths[mi] < hash)
hi = mi;
else
lo = mi + 1;
}
return -lo-1;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,975 | static void *get_delta(struct object_entry *entry)
{
unsigned long size, base_size, delta_size;
void *buf, *base_buf, *delta_buf;
enum object_type type;
buf = read_sha1_file(entry->idx.sha1, &type, &size);
if (!buf)
die("unable to read %s", sha1_to_hex(entry->idx.sha1));
base_buf = read_sha1_file(entry->delta-... | Exec Code Overflow | 0 | static void *get_delta(struct object_entry *entry)
{
unsigned long size, base_size, delta_size;
void *buf, *base_buf, *delta_buf;
enum object_type type;
buf = read_sha1_file(entry->idx.sha1, &type, &size);
if (!buf)
die("unable to read %s", sha1_to_hex(entry->idx.sha1));
base_buf = read_sha1_file(entry->delta-... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,976 | static void get_object_details(void)
{
uint32_t i;
struct object_entry **sorted_by_offset;
sorted_by_offset = xcalloc(to_pack.nr_objects, sizeof(struct object_entry *));
for (i = 0; i < to_pack.nr_objects; i++)
sorted_by_offset[i] = to_pack.objects + i;
qsort(sorted_by_offset, to_pack.nr_objects, sizeof(*sorted... | Exec Code Overflow | 0 | static void get_object_details(void)
{
uint32_t i;
struct object_entry **sorted_by_offset;
sorted_by_offset = xcalloc(to_pack.nr_objects, sizeof(struct object_entry *));
for (i = 0; i < to_pack.nr_objects; i++)
sorted_by_offset[i] = to_pack.objects + i;
qsort(sorted_by_offset, to_pack.nr_objects, sizeof(*sorted... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,977 | static int get_object_list_from_bitmap(struct rev_info *revs)
{
if (prepare_bitmap_walk(revs) < 0)
return -1;
if (pack_options_allow_reuse() &&
!reuse_partial_packfile_from_bitmap(
&reuse_packfile,
&reuse_packfile_objects,
&reuse_packfile_offset)) {
assert(reuse_packfile_objects);
nr_result += re... | Exec Code Overflow | 0 | static int get_object_list_from_bitmap(struct rev_info *revs)
{
if (prepare_bitmap_walk(revs) < 0)
return -1;
if (pack_options_allow_reuse() &&
!reuse_partial_packfile_from_bitmap(
&reuse_packfile,
&reuse_packfile_objects,
&reuse_packfile_offset)) {
assert(reuse_packfile_objects);
nr_result += re... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,978 | static int git_pack_config(const char *k, const char *v, void *cb)
{
if (!strcmp(k, "pack.window")) {
window = git_config_int(k, v);
return 0;
}
if (!strcmp(k, "pack.windowmemory")) {
window_memory_limit = git_config_ulong(k, v);
return 0;
}
if (!strcmp(k, "pack.depth")) {
depth = git_config_int(k, v);
... | Exec Code Overflow | 0 | static int git_pack_config(const char *k, const char *v, void *cb)
{
if (!strcmp(k, "pack.window")) {
window = git_config_int(k, v);
return 0;
}
if (!strcmp(k, "pack.windowmemory")) {
window_memory_limit = git_config_ulong(k, v);
return 0;
}
if (!strcmp(k, "pack.depth")) {
depth = git_config_int(k, v);
... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,979 | static int have_duplicate_entry(const unsigned char *sha1,
int exclude,
uint32_t *index_pos)
{
struct object_entry *entry;
entry = packlist_find(&to_pack, sha1, index_pos);
if (!entry)
return 0;
if (exclude) {
if (!entry->preferred_base)
nr_result--;
entry->preferred_base = 1;
}
return 1;
}
| Exec Code Overflow | 0 | static int have_duplicate_entry(const unsigned char *sha1,
int exclude,
uint32_t *index_pos)
{
struct object_entry *entry;
entry = packlist_find(&to_pack, sha1, index_pos);
if (!entry)
return 0;
if (exclude) {
if (!entry->preferred_base)
nr_result--;
entry->preferred_base = 1;
}
return 1;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,980 | static void index_commit_for_bitmap(struct commit *commit)
{
if (indexed_commits_nr >= indexed_commits_alloc) {
indexed_commits_alloc = (indexed_commits_alloc + 32) * 2;
REALLOC_ARRAY(indexed_commits, indexed_commits_alloc);
}
indexed_commits[indexed_commits_nr++] = commit;
}
| Exec Code Overflow | 0 | static void index_commit_for_bitmap(struct commit *commit)
{
if (indexed_commits_nr >= indexed_commits_alloc) {
indexed_commits_alloc = (indexed_commits_alloc + 32) * 2;
REALLOC_ARRAY(indexed_commits, indexed_commits_alloc);
}
indexed_commits[indexed_commits_nr++] = commit;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,981 | static void init_threaded_search(void)
{
init_recursive_mutex(&read_mutex);
pthread_mutex_init(&cache_mutex, NULL);
pthread_mutex_init(&progress_mutex, NULL);
pthread_cond_init(&progress_cond, NULL);
old_try_to_free_routine = set_try_to_free_routine(try_to_free_from_threads);
}
| Exec Code Overflow | 0 | static void init_threaded_search(void)
{
init_recursive_mutex(&read_mutex);
pthread_mutex_init(&cache_mutex, NULL);
pthread_mutex_init(&progress_mutex, NULL);
pthread_cond_init(&progress_cond, NULL);
old_try_to_free_routine = set_try_to_free_routine(try_to_free_from_threads);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,982 | static void loosen_unused_packed_objects(struct rev_info *revs)
{
struct packed_git *p;
uint32_t i;
const unsigned char *sha1;
for (p = packed_git; p; p = p->next) {
if (!p->pack_local || p->pack_keep)
continue;
if (open_pack_index(p))
die("cannot open pack index");
for (i = 0; i < p->num_objects; i+... | Exec Code Overflow | 0 | static void loosen_unused_packed_objects(struct rev_info *revs)
{
struct packed_git *p;
uint32_t i;
const unsigned char *sha1;
for (p = packed_git; p; p = p->next) {
if (!p->pack_local || p->pack_keep)
continue;
if (open_pack_index(p))
die("cannot open pack index");
for (i = 0; i < p->num_objects; i+... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,983 | static int loosened_object_can_be_discarded(const unsigned char *sha1,
unsigned long mtime)
{
if (!unpack_unreachable_expiration)
return 0;
if (mtime > unpack_unreachable_expiration)
return 0;
if (sha1_array_lookup(&recent_objects, sha1) >= 0)
return 0;
return 1;
}
| Exec Code Overflow | 0 | static int loosened_object_can_be_discarded(const unsigned char *sha1,
unsigned long mtime)
{
if (!unpack_unreachable_expiration)
return 0;
if (mtime > unpack_unreachable_expiration)
return 0;
if (sha1_array_lookup(&recent_objects, sha1) >= 0)
return 0;
return 1;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,984 | static void mark_in_pack_object(struct object *object, struct packed_git *p, struct in_pack *in_pack)
{
in_pack->array[in_pack->nr].offset = find_pack_entry_one(object->oid.hash, p);
in_pack->array[in_pack->nr].object = object;
in_pack->nr++;
}
| Exec Code Overflow | 0 | static void mark_in_pack_object(struct object *object, struct packed_git *p, struct in_pack *in_pack)
{
in_pack->array[in_pack->nr].offset = find_pack_entry_one(object->oid.hash, p);
in_pack->array[in_pack->nr].object = object;
in_pack->nr++;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,985 | static int mark_tagged(const char *path, const struct object_id *oid, int flag,
void *cb_data)
{
unsigned char peeled[20];
struct object_entry *entry = packlist_find(&to_pack, oid->hash, NULL);
if (entry)
entry->tagged = 1;
if (!peel_ref(path, peeled)) {
entry = packlist_find(&to_pack, peeled, NULL);
... | Exec Code Overflow | 0 | static int mark_tagged(const char *path, const struct object_id *oid, int flag,
void *cb_data)
{
unsigned char peeled[20];
struct object_entry *entry = packlist_find(&to_pack, oid->hash, NULL);
if (entry)
entry->tagged = 1;
if (!peel_ref(path, peeled)) {
entry = packlist_find(&to_pack, peeled, NULL);
... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,986 | static int name_cmp_len(const char *name)
{
int i;
for (i = 0; name[i] && name[i] != '\n' && name[i] != '/'; i++)
;
return i;
}
| Exec Code Overflow | 0 | static int name_cmp_len(const char *name)
{
int i;
for (i = 0; name[i] && name[i] != '\n' && name[i] != '/'; i++)
;
return i;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,987 | static int no_try_delta(const char *path)
{
struct git_attr_check check[1];
setup_delta_attr_check(check);
if (git_check_attr(path, ARRAY_SIZE(check), check))
return 0;
if (ATTR_FALSE(check->value))
return 1;
return 0;
}
| Exec Code Overflow | 0 | static int no_try_delta(const char *path)
{
struct git_attr_check check[1];
setup_delta_attr_check(check);
if (git_check_attr(path, ARRAY_SIZE(check), check))
return 0;
if (ATTR_FALSE(check->value))
return 1;
return 0;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,988 | static int ofscmp(const void *a_, const void *b_)
{
struct in_pack_object *a = (struct in_pack_object *)a_;
struct in_pack_object *b = (struct in_pack_object *)b_;
if (a->offset < b->offset)
return -1;
else if (a->offset > b->offset)
return 1;
else
return oidcmp(&a->object->oid, &b->object->oid);
}
| Exec Code Overflow | 0 | static int ofscmp(const void *a_, const void *b_)
{
struct in_pack_object *a = (struct in_pack_object *)a_;
struct in_pack_object *b = (struct in_pack_object *)b_;
if (a->offset < b->offset)
return -1;
else if (a->offset > b->offset)
return 1;
else
return oidcmp(&a->object->oid, &b->object->oid);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,989 | static int option_parse_unpack_unreachable(const struct option *opt,
const char *arg, int unset)
{
if (unset) {
unpack_unreachable = 0;
unpack_unreachable_expiration = 0;
}
else {
unpack_unreachable = 1;
if (arg)
unpack_unreachable_expiration = approxidate(arg);
}
return 0;
}
| Exec Code Overflow | 0 | static int option_parse_unpack_unreachable(const struct option *opt,
const char *arg, int unset)
{
if (unset) {
unpack_unreachable = 0;
unpack_unreachable_expiration = 0;
}
else {
unpack_unreachable = 1;
if (arg)
unpack_unreachable_expiration = approxidate(arg);
}
return 0;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,990 | static int pack_options_allow_reuse(void)
{
return allow_ofs_delta;
}
| Exec Code Overflow | 0 | static int pack_options_allow_reuse(void)
{
return allow_ofs_delta;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,991 | static int pbase_tree_cache_ix(const unsigned char *sha1)
{
return sha1[0] % ARRAY_SIZE(pbase_tree_cache);
}
| Exec Code Overflow | 0 | static int pbase_tree_cache_ix(const unsigned char *sha1)
{
return sha1[0] % ARRAY_SIZE(pbase_tree_cache);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,992 | static int pbase_tree_cache_ix_incr(int ix)
{
return (ix+1) % ARRAY_SIZE(pbase_tree_cache);
}
| Exec Code Overflow | 0 | static int pbase_tree_cache_ix_incr(int ix)
{
return (ix+1) % ARRAY_SIZE(pbase_tree_cache);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,993 | static struct pbase_tree_cache *pbase_tree_get(const unsigned char *sha1)
{
struct pbase_tree_cache *ent, *nent;
void *data;
unsigned long size;
enum object_type type;
int neigh;
int my_ix = pbase_tree_cache_ix(sha1);
int available_ix = -1;
/* pbase-tree-cache acts as a limited hashtable.
* your object will ... | Exec Code Overflow | 0 | static struct pbase_tree_cache *pbase_tree_get(const unsigned char *sha1)
{
struct pbase_tree_cache *ent, *nent;
void *data;
unsigned long size;
enum object_type type;
int neigh;
int my_ix = pbase_tree_cache_ix(sha1);
int available_ix = -1;
/* pbase-tree-cache acts as a limited hashtable.
* your object will ... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,994 | static void prepare_pack(int window, int depth)
{
struct object_entry **delta_list;
uint32_t i, nr_deltas;
unsigned n;
get_object_details();
/*
* If we're locally repacking then we need to be doubly careful
* from now on in order to make sure no stealth corruption gets
* propagated to the new pack. Client... | Exec Code Overflow | 0 | static void prepare_pack(int window, int depth)
{
struct object_entry **delta_list;
uint32_t i, nr_deltas;
unsigned n;
get_object_details();
/*
* If we're locally repacking then we need to be doubly careful
* from now on in order to make sure no stealth corruption gets
* propagated to the new pack. Client... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,995 | static void read_object_list_from_stdin(void)
{
char line[40 + 1 + PATH_MAX + 2];
unsigned char sha1[20];
for (;;) {
if (!fgets(line, sizeof(line), stdin)) {
if (feof(stdin))
break;
if (!ferror(stdin))
die("fgets returned NULL, not EOF, not error!");
if (errno != EINTR)
die_errno("fgets");
... | Exec Code Overflow | 0 | static void read_object_list_from_stdin(void)
{
char line[40 + 1 + PATH_MAX + 2];
unsigned char sha1[20];
for (;;) {
if (!fgets(line, sizeof(line), stdin)) {
if (feof(stdin))
break;
if (!ferror(stdin))
die("fgets returned NULL, not EOF, not error!");
if (errno != EINTR)
die_errno("fgets");
... | @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,996 | static void record_recent_commit(struct commit *commit, void *data)
{
sha1_array_append(&recent_objects, commit->object.oid.hash);
}
| Exec Code Overflow | 0 | static void record_recent_commit(struct commit *commit, void *data)
{
sha1_array_append(&recent_objects, commit->object.oid.hash);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,997 | static void setup_delta_attr_check(struct git_attr_check *check)
{
static struct git_attr *attr_delta;
if (!attr_delta)
attr_delta = git_attr("delta");
check[0].attr = attr_delta;
}
| Exec Code Overflow | 0 | static void setup_delta_attr_check(struct git_attr_check *check)
{
static struct git_attr *attr_delta;
if (!attr_delta)
attr_delta = git_attr("delta");
check[0].attr = attr_delta;
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,998 | static void show_commit(struct commit *commit, void *data)
{
add_object_entry(commit->object.oid.hash, OBJ_COMMIT, NULL, 0);
commit->object.flags |= OBJECT_ADDED;
if (write_bitmap_index)
index_commit_for_bitmap(commit);
}
| Exec Code Overflow | 0 | static void show_commit(struct commit *commit, void *data)
{
add_object_entry(commit->object.oid.hash, OBJ_COMMIT, NULL, 0);
commit->object.flags |= OBJECT_ADDED;
if (write_bitmap_index)
index_commit_for_bitmap(commit);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
43,999 | static void show_edge(struct commit *commit)
{
add_preferred_base(commit->object.oid.hash);
}
| Exec Code Overflow | 0 | static void show_edge(struct commit *commit)
{
add_preferred_base(commit->object.oid.hash);
}
| @@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data)
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- struct strbuf *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name =... | CWE-119 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.