idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
41,400 | ModuleExport void UnregisterDCMImage(void)
{
(void) UnregisterMagickInfo("DCM");
}
| null | 0 | ModuleExport void UnregisterDCMImage(void)
{
(void) UnregisterMagickInfo("DCM");
}
| @@ -3216,6 +3216,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Photometric interpretation.
*/
+ if (data == (unsigned char *) NULL)
+ break;
for (i=0; i < (ssize_t) MagickMin(length,MagickPathExtent-... | CWE-20 | null | null |
41,401 | _archive_write_disk_data_block(struct archive *_a,
const void *buff, size_t size, int64_t offset)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
ssize_t r;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_data_block");
a->offset = offset;
i... | null | 0 | _archive_write_disk_data_block(struct archive *_a,
const void *buff, size_t size, int64_t offset)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
ssize_t r;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_data_block");
a->offset = offset;
i... | @@ -326,12 +326,14 @@ struct archive_write_disk {
#define HFS_BLOCKS(s) ((s) >> 12)
+static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags);
static int check_symlinks(struct archive_write_disk *);
static int create_filesystem_object(struct archive_write_dis... | CWE-20 | null | null |
41,402 | clear_nochange_fflags(struct archive_write_disk *a)
{
int nochange_flags;
mode_t mode = archive_entry_mode(a->entry);
/* Hopefully, the compiler will optimize this mess into a constant. */
nochange_flags = 0;
#ifdef SF_IMMUTABLE
nochange_flags |= SF_IMMUTABLE;
#endif
#ifdef UF_IMMUTABLE
nochange_flags |= UF_IM... | null | 0 | clear_nochange_fflags(struct archive_write_disk *a)
{
int nochange_flags;
mode_t mode = archive_entry_mode(a->entry);
/* Hopefully, the compiler will optimize this mess into a constant. */
nochange_flags = 0;
#ifdef SF_IMMUTABLE
nochange_flags |= SF_IMMUTABLE;
#endif
#ifdef UF_IMMUTABLE
nochange_flags |= UF_IM... | @@ -326,12 +326,14 @@ struct archive_write_disk {
#define HFS_BLOCKS(s) ((s) >> 12)
+static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags);
static int check_symlinks(struct archive_write_disk *);
static int create_filesystem_object(struct archive_write_dis... | CWE-20 | null | null |
41,403 | edit_deep_directories(struct archive_write_disk *a)
{
int ret;
char *tail = a->name;
/* If path is short, avoid the open() below. */
if (strlen(tail) < PATH_MAX)
return;
/* Try to record our starting dir. */
a->restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC);
__archive_ensure_cloexec_flag(a->restore... | null | 0 | edit_deep_directories(struct archive_write_disk *a)
{
int ret;
char *tail = a->name;
/* If path is short, avoid the open() below. */
if (strlen(tail) < PATH_MAX)
return;
/* Try to record our starting dir. */
a->restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC);
__archive_ensure_cloexec_flag(a->restore... | @@ -326,12 +326,14 @@ struct archive_write_disk {
#define HFS_BLOCKS(s) ((s) >> 12)
+static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags);
static int check_symlinks(struct archive_write_disk *);
static int create_filesystem_object(struct archive_write_dis... | CWE-20 | null | null |
41,404 | restore_entry(struct archive_write_disk *a)
{
int ret = ARCHIVE_OK, en;
if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) {
/*
* TODO: Fix this. Apparently, there are platforms
* that still allow root to hose the entire filesystem
* by unlinking a dir. The S_ISDIR() test above
* prevents us... | null | 0 | restore_entry(struct archive_write_disk *a)
{
int ret = ARCHIVE_OK, en;
if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) {
/*
* TODO: Fix this. Apparently, there are platforms
* that still allow root to hose the entire filesystem
* by unlinking a dir. The S_ISDIR() test above
* prevents us... | @@ -326,12 +326,14 @@ struct archive_write_disk {
#define HFS_BLOCKS(s) ((s) >> 12)
+static int check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags);
static int check_symlinks(struct archive_write_disk *);
static int create_filesystem_object(struct archive_write_dis... | CWE-20 | null | null |
41,405 | static int airspy_alloc_urbs(struct airspy *s)
{
int i, j;
/* allocate the URBs */
for (i = 0; i < MAX_BULK_BUFS; i++) {
dev_dbg(s->dev, "alloc urb=%d\n", i);
s->urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC);
if (!s->urb_list[i]) {
dev_dbg(s->dev, "failed\n");
for (j = 0; j < i; j++)
usb_free_urb(s->ur... | DoS Overflow | 0 | static int airspy_alloc_urbs(struct airspy *s)
{
int i, j;
/* allocate the URBs */
for (i = 0; i < MAX_BULK_BUFS; i++) {
dev_dbg(s->dev, "alloc urb=%d\n", i);
s->urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC);
if (!s->urb_list[i]) {
dev_dbg(s->dev, "failed\n");
for (j = 0; j < i; j++)
usb_free_urb(s->ur... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,406 | static void airspy_buf_queue(struct vb2_buffer *vb)
{
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
struct airspy *s = vb2_get_drv_priv(vb->vb2_queue);
struct airspy_frame_buf *buf =
container_of(vbuf, struct airspy_frame_buf, vb);
unsigned long flags;
/* Check the device has not disconnected between ... | DoS Overflow | 0 | static void airspy_buf_queue(struct vb2_buffer *vb)
{
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
struct airspy *s = vb2_get_drv_priv(vb->vb2_queue);
struct airspy_frame_buf *buf =
container_of(vbuf, struct airspy_frame_buf, vb);
unsigned long flags;
/* Check the device has not disconnected between ... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,407 | static void airspy_cleanup_queued_bufs(struct airspy *s)
{
unsigned long flags;
dev_dbg(s->dev, "\n");
spin_lock_irqsave(&s->queued_bufs_lock, flags);
while (!list_empty(&s->queued_bufs)) {
struct airspy_frame_buf *buf;
buf = list_entry(s->queued_bufs.next,
struct airspy_frame_buf, list);
list_del(&buf... | DoS Overflow | 0 | static void airspy_cleanup_queued_bufs(struct airspy *s)
{
unsigned long flags;
dev_dbg(s->dev, "\n");
spin_lock_irqsave(&s->queued_bufs_lock, flags);
while (!list_empty(&s->queued_bufs)) {
struct airspy_frame_buf *buf;
buf = list_entry(s->queued_bufs.next,
struct airspy_frame_buf, list);
list_del(&buf... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,408 | static unsigned int airspy_convert_stream(struct airspy *s,
void *dst, void *src, unsigned int src_len)
{
unsigned int dst_len;
if (s->pixelformat == V4L2_SDR_FMT_RU12LE) {
memcpy(dst, src, src_len);
dst_len = src_len;
} else {
dst_len = 0;
}
/* calculate sample rate and output it in 10 seconds intervals... | DoS Overflow | 0 | static unsigned int airspy_convert_stream(struct airspy *s,
void *dst, void *src, unsigned int src_len)
{
unsigned int dst_len;
if (s->pixelformat == V4L2_SDR_FMT_RU12LE) {
memcpy(dst, src, src_len);
dst_len = src_len;
} else {
dst_len = 0;
}
/* calculate sample rate and output it in 10 seconds intervals... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,409 | static int airspy_ctrl_msg(struct airspy *s, u8 request, u16 value, u16 index,
u8 *data, u16 size)
{
int ret;
unsigned int pipe;
u8 requesttype;
switch (request) {
case CMD_RECEIVER_MODE:
case CMD_SET_FREQ:
pipe = usb_sndctrlpipe(s->udev, 0);
requesttype = (USB_TYPE_VENDOR | USB_DIR_OUT);
break;
case CM... | DoS Overflow | 0 | static int airspy_ctrl_msg(struct airspy *s, u8 request, u16 value, u16 index,
u8 *data, u16 size)
{
int ret;
unsigned int pipe;
u8 requesttype;
switch (request) {
case CMD_RECEIVER_MODE:
case CMD_SET_FREQ:
pipe = usb_sndctrlpipe(s->udev, 0);
requesttype = (USB_TYPE_VENDOR | USB_DIR_OUT);
break;
case CM... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,410 | static void airspy_disconnect(struct usb_interface *intf)
{
struct v4l2_device *v = usb_get_intfdata(intf);
struct airspy *s = container_of(v, struct airspy, v4l2_dev);
dev_dbg(s->dev, "\n");
mutex_lock(&s->vb_queue_lock);
mutex_lock(&s->v4l2_lock);
/* No need to keep the urbs around after disconnection */
s->... | DoS Overflow | 0 | static void airspy_disconnect(struct usb_interface *intf)
{
struct v4l2_device *v = usb_get_intfdata(intf);
struct airspy *s = container_of(v, struct airspy, v4l2_dev);
dev_dbg(s->dev, "\n");
mutex_lock(&s->vb_queue_lock);
mutex_lock(&s->v4l2_lock);
/* No need to keep the urbs around after disconnection */
s->... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,411 | static int airspy_enum_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
if (f->index >= NUM_FORMATS)
return -EINVAL;
strlcpy(f->description, formats[f->index].name, sizeof(f->description));
f->pixelformat = formats[f->index].pixelformat;
return 0;
}
| DoS Overflow | 0 | static int airspy_enum_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
if (f->index >= NUM_FORMATS)
return -EINVAL;
strlcpy(f->description, formats[f->index].name, sizeof(f->description));
f->pixelformat = formats[f->index].pixelformat;
return 0;
}
| @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,412 | static int airspy_enum_freq_bands(struct file *file, void *priv,
struct v4l2_frequency_band *band)
{
int ret;
if (band->tuner == 0) {
if (band->index >= ARRAY_SIZE(bands)) {
ret = -EINVAL;
} else {
*band = bands[band->index];
ret = 0;
}
} else if (band->tuner == 1) {
if (band->index >= ARRAY_SIZE... | DoS Overflow | 0 | static int airspy_enum_freq_bands(struct file *file, void *priv,
struct v4l2_frequency_band *band)
{
int ret;
if (band->tuner == 0) {
if (band->index >= ARRAY_SIZE(bands)) {
ret = -EINVAL;
} else {
*band = bands[band->index];
ret = 0;
}
} else if (band->tuner == 1) {
if (band->index >= ARRAY_SIZE... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,413 | static int airspy_free_stream_bufs(struct airspy *s)
{
if (test_bit(USB_STATE_URB_BUF, &s->flags)) {
while (s->buf_num) {
s->buf_num--;
dev_dbg(s->dev, "free buf=%d\n", s->buf_num);
usb_free_coherent(s->udev, s->buf_size,
s->buf_list[s->buf_num],
s->dma_addr[s->buf_num]);
}
}
clear_bit(USB... | DoS Overflow | 0 | static int airspy_free_stream_bufs(struct airspy *s)
{
if (test_bit(USB_STATE_URB_BUF, &s->flags)) {
while (s->buf_num) {
s->buf_num--;
dev_dbg(s->dev, "free buf=%d\n", s->buf_num);
usb_free_coherent(s->udev, s->buf_size,
s->buf_list[s->buf_num],
s->dma_addr[s->buf_num]);
}
}
clear_bit(USB... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,414 | static int airspy_g_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct airspy *s = video_drvdata(file);
f->fmt.sdr.pixelformat = s->pixelformat;
f->fmt.sdr.buffersize = s->buffersize;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
return 0;
}
| DoS Overflow | 0 | static int airspy_g_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct airspy *s = video_drvdata(file);
f->fmt.sdr.pixelformat = s->pixelformat;
f->fmt.sdr.buffersize = s->buffersize;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
return 0;
}
| @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,415 | static int airspy_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{
struct airspy *s = video_drvdata(file);
int ret;
if (f->tuner == 0) {
f->type = V4L2_TUNER_ADC;
f->frequency = s->f_adc;
dev_dbg(s->dev, "ADC frequency=%u Hz\n", s->f_adc);
ret = 0;
} else if (f->tuner == 1) {
f->t... | DoS Overflow | 0 | static int airspy_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{
struct airspy *s = video_drvdata(file);
int ret;
if (f->tuner == 0) {
f->type = V4L2_TUNER_ADC;
f->frequency = s->f_adc;
dev_dbg(s->dev, "ADC frequency=%u Hz\n", s->f_adc);
ret = 0;
} else if (f->tuner == 1) {
f->t... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,416 | static struct airspy_frame_buf *airspy_get_next_fill_buf(struct airspy *s)
{
unsigned long flags;
struct airspy_frame_buf *buf = NULL;
spin_lock_irqsave(&s->queued_bufs_lock, flags);
if (list_empty(&s->queued_bufs))
goto leave;
buf = list_entry(s->queued_bufs.next,
struct airspy_frame_buf, list);
list_del(... | DoS Overflow | 0 | static struct airspy_frame_buf *airspy_get_next_fill_buf(struct airspy *s)
{
unsigned long flags;
struct airspy_frame_buf *buf = NULL;
spin_lock_irqsave(&s->queued_bufs_lock, flags);
if (list_empty(&s->queued_bufs))
goto leave;
buf = list_entry(s->queued_bufs.next,
struct airspy_frame_buf, list);
list_del(... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,417 | static int airspy_kill_urbs(struct airspy *s)
{
int i;
for (i = s->urbs_submitted - 1; i >= 0; i--) {
dev_dbg(s->dev, "kill urb=%d\n", i);
/* stop the URB */
usb_kill_urb(s->urb_list[i]);
}
s->urbs_submitted = 0;
return 0;
}
| DoS Overflow | 0 | static int airspy_kill_urbs(struct airspy *s)
{
int i;
for (i = s->urbs_submitted - 1; i >= 0; i--) {
dev_dbg(s->dev, "kill urb=%d\n", i);
/* stop the URB */
usb_kill_urb(s->urb_list[i]);
}
s->urbs_submitted = 0;
return 0;
}
| @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,418 | static int airspy_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{
struct airspy *s = video_drvdata(file);
strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver));
strlcpy(cap->card, s->vdev.name, sizeof(cap->card));
usb_make_path(s->udev, cap->bus_info, sizeof(cap->bus_info));
cap->device... | DoS Overflow | 0 | static int airspy_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{
struct airspy *s = video_drvdata(file);
strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver));
strlcpy(cap->card, s->vdev.name, sizeof(cap->card));
usb_make_path(s->udev, cap->bus_info, sizeof(cap->bus_info));
cap->device... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,419 | static int airspy_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct airspy *s = container_of(ctrl->handler, struct airspy, hdl);
int ret;
switch (ctrl->id) {
case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO:
case V4L2_CID_RF_TUNER_LNA_GAIN:
ret = airspy_set_lna_gain(s);
break;
case V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO:
case V4L... | DoS Overflow | 0 | static int airspy_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct airspy *s = container_of(ctrl->handler, struct airspy, hdl);
int ret;
switch (ctrl->id) {
case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO:
case V4L2_CID_RF_TUNER_LNA_GAIN:
ret = airspy_set_lna_gain(s);
break;
case V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO:
case V4L... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,420 | static int airspy_s_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct airspy *s = video_drvdata(file);
struct vb2_queue *q = &s->vb_queue;
int i;
if (vb2_is_busy(q))
return -EBUSY;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
for (i = 0; i < NUM_FORMATS; i++) {
if ... | DoS Overflow | 0 | static int airspy_s_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct airspy *s = video_drvdata(file);
struct vb2_queue *q = &s->vb_queue;
int i;
if (vb2_is_busy(q))
return -EBUSY;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
for (i = 0; i < NUM_FORMATS; i++) {
if ... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,421 | static int airspy_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{
struct airspy *s = video_drvdata(file);
int ret;
u8 buf[4];
if (f->tuner == 0) {
s->f_adc = clamp_t(unsigned int, f->frequency,
bands[0].rangelow,
bands[0].rangehigh);
dev_dbg(s->dev, "ADC frequency=%u Hz\n... | DoS Overflow | 0 | static int airspy_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{
struct airspy *s = video_drvdata(file);
int ret;
u8 buf[4];
if (f->tuner == 0) {
s->f_adc = clamp_t(unsigned int, f->frequency,
bands[0].rangelow,
bands[0].rangehigh);
dev_dbg(s->dev, "ADC frequency=%u Hz\n... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,422 | static int airspy_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *v)
{
int ret;
if (v->index == 0)
ret = 0;
else if (v->index == 1)
ret = 0;
else
ret = -EINVAL;
return ret;
}
| DoS Overflow | 0 | static int airspy_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *v)
{
int ret;
if (v->index == 0)
ret = 0;
else if (v->index == 1)
ret = 0;
else
ret = -EINVAL;
return ret;
}
| @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,423 | static int airspy_set_mixer_gain(struct airspy *s)
{
int ret;
u8 u8tmp;
dev_dbg(s->dev, "mixer auto=%d->%d val=%d->%d\n",
s->mixer_gain_auto->cur.val, s->mixer_gain_auto->val,
s->mixer_gain->cur.val, s->mixer_gain->val);
ret = airspy_ctrl_msg(s, CMD_SET_MIXER_AGC, 0, s->mixer_gain_auto->val,
&u8tmp, 1);
... | DoS Overflow | 0 | static int airspy_set_mixer_gain(struct airspy *s)
{
int ret;
u8 u8tmp;
dev_dbg(s->dev, "mixer auto=%d->%d val=%d->%d\n",
s->mixer_gain_auto->cur.val, s->mixer_gain_auto->val,
s->mixer_gain->cur.val, s->mixer_gain->val);
ret = airspy_ctrl_msg(s, CMD_SET_MIXER_AGC, 0, s->mixer_gain_auto->val,
&u8tmp, 1);
... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,424 | static void airspy_stop_streaming(struct vb2_queue *vq)
{
struct airspy *s = vb2_get_drv_priv(vq);
dev_dbg(s->dev, "\n");
mutex_lock(&s->v4l2_lock);
/* stop hardware streaming */
airspy_ctrl_msg(s, CMD_RECEIVER_MODE, 0, 0, NULL, 0);
airspy_kill_urbs(s);
airspy_free_urbs(s);
airspy_free_stream_bufs(s);
air... | DoS Overflow | 0 | static void airspy_stop_streaming(struct vb2_queue *vq)
{
struct airspy *s = vb2_get_drv_priv(vq);
dev_dbg(s->dev, "\n");
mutex_lock(&s->v4l2_lock);
/* stop hardware streaming */
airspy_ctrl_msg(s, CMD_RECEIVER_MODE, 0, 0, NULL, 0);
airspy_kill_urbs(s);
airspy_free_urbs(s);
airspy_free_stream_bufs(s);
air... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,425 | static int airspy_submit_urbs(struct airspy *s)
{
int i, ret;
for (i = 0; i < s->urbs_initialized; i++) {
dev_dbg(s->dev, "submit urb=%d\n", i);
ret = usb_submit_urb(s->urb_list[i], GFP_ATOMIC);
if (ret) {
dev_err(s->dev, "Could not submit URB no. %d - get them all back\n",
i);
airspy_kill_urbs(s);
... | DoS Overflow | 0 | static int airspy_submit_urbs(struct airspy *s)
{
int i, ret;
for (i = 0; i < s->urbs_initialized; i++) {
dev_dbg(s->dev, "submit urb=%d\n", i);
ret = usb_submit_urb(s->urb_list[i], GFP_ATOMIC);
if (ret) {
dev_err(s->dev, "Could not submit URB no. %d - get them all back\n",
i);
airspy_kill_urbs(s);
... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,426 | static int airspy_try_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
int i;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
for (i = 0; i < NUM_FORMATS; i++) {
if (formats[i].pixelformat == f->fmt.sdr.pixelformat) {
f->fmt.sdr.buffersize = formats[i].buffersize;
return 0;... | DoS Overflow | 0 | static int airspy_try_fmt_sdr_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
int i;
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
for (i = 0; i < NUM_FORMATS; i++) {
if (formats[i].pixelformat == f->fmt.sdr.pixelformat) {
f->fmt.sdr.buffersize = formats[i].buffersize;
return 0;... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,427 | static void airspy_urb_complete(struct urb *urb)
{
struct airspy *s = urb->context;
struct airspy_frame_buf *fbuf;
dev_dbg_ratelimited(s->dev, "status=%d length=%d/%d errors=%d\n",
urb->status, urb->actual_length,
urb->transfer_buffer_length, urb->error_count);
switch (urb->status) {
case 0: /*... | DoS Overflow | 0 | static void airspy_urb_complete(struct urb *urb)
{
struct airspy *s = urb->context;
struct airspy_frame_buf *fbuf;
dev_dbg_ratelimited(s->dev, "status=%d length=%d/%d errors=%d\n",
urb->status, urb->actual_length,
urb->transfer_buffer_length, urb->error_count);
switch (urb->status) {
case 0: /*... | @@ -1072,7 +1072,7 @@ static int airspy_probe(struct usb_interface *intf,
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n",
ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
dev_info(s->dev, "Registered as %s\n",
video_device_node_name(&s->vdev));
@@ -1081,7 +10... | CWE-119 | null | null |
41,428 | void complete_v1_state_transition(struct msg_digest **mdp, stf_status result)
{
struct msg_digest *md = *mdp;
enum state_kind from_state;
struct state *st;
passert(md != NULL);
/* handle oddball/meta results now */
switch (result) {
case STF_SUSPEND:
cur_state = md->st; /* might have changed */
/* FALL TH... | DoS | 0 | void complete_v1_state_transition(struct msg_digest **mdp, stf_status result)
{
struct msg_digest *md = *mdp;
enum state_kind from_state;
struct state *st;
passert(md != NULL);
/* handle oddball/meta results now */
switch (result) {
case STF_SUSPEND:
cur_state = md->st; /* might have changed */
/* FALL TH... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,429 | void doi_log_cert_thinking(u_int16_t auth,
enum ike_cert_type certtype,
enum certpolicy policy,
bool gotcertrequest,
bool send_cert,
bool send_chain)
{
DBG(DBG_CONTROL,
DBG_log("thinking about whether to send my certificate:"));
DBG(DBG_CONTROL, {
struct esb_buf esb;
DBG_log(" I have RSA ... | DoS | 0 | void doi_log_cert_thinking(u_int16_t auth,
enum ike_cert_type certtype,
enum certpolicy policy,
bool gotcertrequest,
bool send_cert,
bool send_chain)
{
DBG(DBG_CONTROL,
DBG_log("thinking about whether to send my certificate:"));
DBG(DBG_CONTROL, {
struct esb_buf esb;
DBG_log(" I have RSA ... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,430 | bool ikev1_decode_peer_id(struct msg_digest *md, bool initiator, bool aggrmode)
{
struct state *const st = md->st;
struct payload_digest *const id_pld = md->chain[ISAKMP_NEXT_ID];
const pb_stream *const id_pbs = &id_pld->pbs;
struct isakmp_id *const id = &id_pld->payload.id;
struct id peer;
/* I think that RFC24... | DoS | 0 | bool ikev1_decode_peer_id(struct msg_digest *md, bool initiator, bool aggrmode)
{
struct state *const st = md->st;
struct payload_digest *const id_pld = md->chain[ISAKMP_NEXT_ID];
const pb_stream *const id_pbs = &id_pld->pbs;
struct isakmp_id *const id = &id_pld->payload.id;
struct id peer;
/* I think that RFC24... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,431 | void ikev1_echo_hdr(struct msg_digest *md, bool enc, u_int8_t np)
{
struct isakmp_hdr hdr = md->hdr; /* mostly same as incoming header */
/* make sure we start with a clean buffer */
init_out_pbs(&reply_stream, reply_buffer, sizeof(reply_buffer),
"reply packet");
hdr.isa_flags = 0; /* zero all flags */
if (en... | DoS | 0 | void ikev1_echo_hdr(struct msg_digest *md, bool enc, u_int8_t np)
{
struct isakmp_hdr hdr = md->hdr; /* mostly same as incoming header */
/* make sure we start with a clean buffer */
init_out_pbs(&reply_stream, reply_buffer, sizeof(reply_buffer),
"reply packet");
hdr.isa_flags = 0; /* zero all flags */
if (en... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,432 | bool ikev1_ship_chain(chunk_t *chain, int n, pb_stream *outs,
u_int8_t type,
u_int8_t setnp)
{
int i;
u_int8_t np;
for (i = 0; i < n; i++) {
/* set np for last cert, or another */
np = i == n - 1 ? setnp : ISAKMP_NEXT_CERT;
if (!ikev1_ship_CERT(type, chain[i], outs, np))
return FALSE;
... | DoS | 0 | bool ikev1_ship_chain(chunk_t *chain, int n, pb_stream *outs,
u_int8_t type,
u_int8_t setnp)
{
int i;
u_int8_t np;
for (i = 0; i < n; i++) {
/* set np for last cert, or another */
np = i == n - 1 ? setnp : ISAKMP_NEXT_CERT;
if (!ikev1_ship_CERT(type, chain[i], outs, np))
return FALSE;
... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,433 | void init_ikev1(void)
{
/* fill ike_microcode_index:
* make ike_microcode_index[s] point to first entry in
* v1_state_microcode_table for state s (backward scan makes this easier).
* Check that table is in order -- catch coding errors.
* For what it's worth, this routine is idempotent.
*/
const struct state... | DoS | 0 | void init_ikev1(void)
{
/* fill ike_microcode_index:
* make ike_microcode_index[s] point to first entry in
* v1_state_microcode_table for state s (backward scan makes this easier).
* Check that table is in order -- catch coding errors.
* For what it's worth, this routine is idempotent.
*/
const struct state... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,434 | void process_packet_tail(struct msg_digest **mdp)
{
struct msg_digest *md = *mdp;
struct state *st = md->st;
enum state_kind from_state = md->from_state;
const struct state_microcode *smc = md->smc;
bool new_iv_set = md->new_iv_set;
bool self_delete = FALSE;
if (md->hdr.isa_flags & ISAKMP_FLAGS_v1_ENCRYPTION) {... | DoS | 0 | void process_packet_tail(struct msg_digest **mdp)
{
struct msg_digest *md = *mdp;
struct state *st = md->st;
enum state_kind from_state = md->from_state;
const struct state_microcode *smc = md->smc;
bool new_iv_set = md->new_iv_set;
bool self_delete = FALSE;
if (md->hdr.isa_flags & ISAKMP_FLAGS_v1_ENCRYPTION) {... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,435 | void process_v1_packet(struct msg_digest **mdp)
{
struct msg_digest *md = *mdp;
const struct state_microcode *smc;
bool new_iv_set = FALSE;
struct state *st = NULL;
enum state_kind from_state = STATE_UNDEFINED; /* state we started in */
#define SEND_NOTIFICATION(t) { \
if (st != NULL) \
send_notification_f... | DoS | 0 | void process_v1_packet(struct msg_digest **mdp)
{
struct msg_digest *md = *mdp;
const struct state_microcode *smc;
bool new_iv_set = FALSE;
struct state *st = NULL;
enum state_kind from_state = STATE_UNDEFINED; /* state we started in */
#define SEND_NOTIFICATION(t) { \
if (st != NULL) \
send_notification_f... | @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,436 | static stf_status unexpected(struct msg_digest *md)
{
loglog(RC_LOG_SERIOUS, "unexpected message received in state %s",
enum_name(&state_names, md->st->st_state));
return STF_IGNORE;
}
| DoS | 0 | static stf_status unexpected(struct msg_digest *md)
{
loglog(RC_LOG_SERIOUS, "unexpected message received in state %s",
enum_name(&state_names, md->st->st_state));
return STF_IGNORE;
}
| @@ -245,7 +245,7 @@ static const struct state_microcode v1_state_microcode_table[] = {
{ STATE_MAIN_R0, STATE_MAIN_R1,
SMF_ALL_AUTH | SMF_REPLY,
P(SA), P(VID) | P(CR), PT(NONE),
- EVENT_v1_RETRANSMIT, main_inI1_outR1 },
+ EVENT_NULL, main_inI1_outR1 },
/* STATE_MAIN_I1: R1 --> I2
* HDR, SA --> auth... | CWE-20 | null | null |
41,437 | static const char * Indent (guint8 level) {
return indent_buffer + (512 - 2 * (level));
}
| DoS Overflow | 0 | static const char * Indent (guint8 level) {
return indent_buffer + (512 - 2 * (level));
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,438 | default_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| DoS Overflow | 0 | default_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,439 | default_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| DoS Overflow | 0 | default_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,440 | default_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| DoS Overflow | 0 | default_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,441 | default_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| DoS Overflow | 0 | default_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,442 | dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_wbxml_common(tvb, pinfo, tree, &decode_uaprof_wap_248);
}
| DoS Overflow | 0 | dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_wbxml_common(tvb, pinfo, tree, &decode_uaprof_wap_248);
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,443 | dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_wbxml_common(tvb, pinfo, tree, NULL);
}
| DoS Overflow | 0 | dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_wbxml_common(tvb, pinfo, tree, NULL);
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,444 | dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
const wbxml_decoding *override_content_map)
{
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *wbxml_tree; /* Main WBXML tree */
proto_tree *wbx... | DoS Overflow | 0 | dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
const wbxml_decoding *override_content_map)
{
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *wbxml_tree; /* Main WBXML tree */
proto_tree *wbx... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,445 | emnc10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Only valid codepage for EMN */
switch (token) {
case 0x05: /* timestamp= */
str = date_ti... | DoS Overflow | 0 | emnc10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Only valid codepage for EMN */
switch (token) {
case 0x05: /* timestamp= */
str = date_ti... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,446 | emnc10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && (strcmp(token, "timestamp") == 0) )
{
str = date_time_from_opaque(tvb, offset + *length, data_len)... | DoS Overflow | 0 | emnc10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && (strcmp(token, "timestamp") == 0) )
{
str = date_time_from_opaque(tvb, offset + *length, data_len)... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,447 | ext_t_0_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - escaped: '%s'",
tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
| DoS Overflow | 0 | ext_t_0_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - escaped: '%s'",
tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,448 | ext_t_0_wv_cspc_11(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str_ext(value, &vals_wv_csp_11_element_value_tokens_ext,
"<Unknown WV-CSP 1.1 Common Value token 0x%X>"));
return str;
}
| DoS Overflow | 0 | ext_t_0_wv_cspc_11(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str_ext(value, &vals_wv_csp_11_element_value_tokens_ext,
"<Unknown WV-CSP 1.1 Common Value token 0x%X>"));
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,449 | ext_t_0_wv_cspc_12(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str(value, vals_wv_csp_12_element_value_tokens,
"<Unknown WV-CSP 1.2 Common Value token 0x%X>"));
return str;
}
| DoS Overflow | 0 | ext_t_0_wv_cspc_12(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str(value, vals_wv_csp_12_element_value_tokens,
"<Unknown WV-CSP 1.2 Common Value token 0x%X>"));
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,450 | ext_t_0_wv_cspc_13(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str(value, vals_wv_csp_13_element_value_tokens,
"<Unknown WV-CSP 1.3 Common Value token 0x%X>"));
return str;
}
| DoS Overflow | 0 | ext_t_0_wv_cspc_13(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
val_to_str(value, vals_wv_csp_13_element_value_tokens,
"<Unknown WV-CSP 1.3 Common Value token 0x%X>"));
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,451 | ext_t_2_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - no transformation: '%s'",
tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
| DoS Overflow | 0 | ext_t_2_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
char *str = wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - no transformation: '%s'",
tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
| @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,452 | static const wbxml_decoding *get_wbxml_decoding_from_content_type (
const char *content_type, tvbuff_t *tvb, guint32 offset)
{
const wbxml_decoding *map = NULL;
DebugLog(("get_wbxml_decoding_from_content_type: content_type = [%s]\n",
content_type));
if (content_type && content_type[0]) {
const wbxm... | DoS Overflow | 0 | static const wbxml_decoding *get_wbxml_decoding_from_content_type (
const char *content_type, tvbuff_t *tvb, guint32 offset)
{
const wbxml_decoding *map = NULL;
DebugLog(("get_wbxml_decoding_from_content_type: content_type = [%s]\n",
content_type));
if (content_type && content_type[0]) {
const wbxm... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,453 | static const wbxml_decoding *get_wbxml_decoding_from_public_id (guint32 public_id)
{
const wbxml_decoding *map = NULL;
DebugLog(("get_wbxml_decoding_from_public_id: public_id = %u\n",
public_id));
if (public_id >= 2) {
const wbxml_integer_list *item = well_known_public_id_list;
while (item && item->public_... | DoS Overflow | 0 | static const wbxml_decoding *get_wbxml_decoding_from_public_id (guint32 public_id)
{
const wbxml_decoding *map = NULL;
DebugLog(("get_wbxml_decoding_from_public_id: public_id = %u\n",
public_id));
if (public_id >= 2) {
const wbxml_integer_list *item = well_known_public_id_list;
while (item && item->public_... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,454 | show_wbxml_string_table (proto_tree *tree, tvbuff_t *tvb, guint32 str_tbl,
guint32 str_tbl_len)
{
guint32 off = str_tbl;
guint32 len = 0;
guint32 end = str_tbl + str_tbl_len;
proto_tree_add_text (tree, tvb, off, end,
"Start | Length | String");
while (off < end) {
len = tvb_strsize (tvb, off);
pr... | DoS Overflow | 0 | show_wbxml_string_table (proto_tree *tree, tvbuff_t *tvb, guint32 str_tbl,
guint32 str_tbl_len)
{
guint32 off = str_tbl;
guint32 len = 0;
guint32 end = str_tbl + str_tbl_len;
proto_tree_add_text (tree, tvb, off, end,
"Start | Length | String");
while (off < end) {
len = tvb_strsize (tvb, off);
pr... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,455 | sic10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Only valid codepage for SI */
switch (token) {
case 0x0A: /* created= */
case 0x10: /* si-ex... | DoS Overflow | 0 | sic10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Only valid codepage for SI */
switch (token) {
case 0x0A: /* created= */
case 0x10: /* si-ex... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,456 | sic10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "created") == 0)
|| (strcmp(token, "si-expires") == 0) ) )
{
str = date_time_fro... | DoS Overflow | 0 | sic10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "created") == 0)
|| (strcmp(token, "si-expires") == 0) ) )
{
str = date_time_fro... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,457 | wv_csp10_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | DoS Overflow | 0 | wv_csp10_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,458 | wv_csp10_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | DoS Overflow | 0 | wv_csp10_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,459 | wv_csp11_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | DoS Overflow | 0 | wv_csp11_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,460 | wv_csp11_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | DoS Overflow | 0 | wv_csp11_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,461 | wv_csp12_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | DoS Overflow | 0 | wv_csp12_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage) {
case 0: /* Common code page */
switch (token) {
case 0x0B: /* <Code> */
case 0x0F: /* <ContentSize>... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,462 | wv_csp12_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | DoS Overflow | 0 | wv_csp12_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,463 | wv_csp13_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage)
{
case 0: /* Common code page */
switch (token)
{
case 0x0B: /* <Code> */
case 0x0F: /* <... | DoS Overflow | 0 | wv_csp13_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
guint8 token, guint8 codepage, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
switch (codepage)
{
case 0: /* Common code page */
switch (token)
{
case 0x0B: /* <Code> */
case 0x0F: /* <... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,464 | wv_csp13_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | DoS Overflow | 0 | wv_csp13_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
const char *token, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = NULL;
if ( token && ( (strcmp(token, "Code") == 0)
|| (strcmp(token, "ContentSize") == 0)
|| (strcmp(token, "Messag... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,465 | wv_csp_discriminator(tvbuff_t *tvb, guint32 offset)
{
guint32 magic_1 = tvb_get_ntohl(tvb, offset + 0);
guint16 magic_2 = tvb_get_ntohs(tvb, offset + 4);
if (magic_1 == 0xFE050331 && magic_2 == 0x2e30)
{
/* FE 05 03 31 2E 30 --> WV-CSP 1.0 */
return &decode_wv_cspc_10;
}
else if (magic_1 == 0xC9050331 &&... | DoS Overflow | 0 | wv_csp_discriminator(tvbuff_t *tvb, guint32 offset)
{
guint32 magic_1 = tvb_get_ntohl(tvb, offset + 0);
guint16 magic_2 = tvb_get_ntohs(tvb, offset + 4);
if (magic_1 == 0xFE050331 && magic_2 == 0x2e30)
{
/* FE 05 03 31 2E 30 --> WV-CSP 1.0 */
return &decode_wv_cspc_10;
}
else if (magic_1 == 0xC9050331 &&... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,466 | wv_datetime_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
{
char *str;
guint16 year;
guint8 month, day, hour, minute, second, time_zone;
guint8 peek;
if (data_len == 6) { /* Valid */
/* Octet 1: 00YY YYYY */
year = tvb_get_guint8(tvb, offset) & 0x3F; /* ..11 1111 */
year <<=6;
/* Octet 2: ... | DoS Overflow | 0 | wv_datetime_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
{
char *str;
guint16 year;
guint8 month, day, hour, minute, second, time_zone;
guint8 peek;
if (data_len == 6) { /* Valid */
/* Octet 1: 00YY YYYY */
year = tvb_get_guint8(tvb, offset) & 0x3F; /* ..11 1111 */
year <<=6;
/* Octet 2: ... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,467 | wv_integer_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
{
char *str;
switch (data_len) {
case 1:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
tvb_get_guint8(tvb, offset));
break;
case 2:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
... | DoS Overflow | 0 | wv_integer_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
{
char *str;
switch (data_len) {
case 1:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
tvb_get_guint8(tvb, offset));
break;
case 2:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
... | @@ -7304,7 +7304,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
- guint32 off = offset;
+ guint32 off = offset, last_off;
guint32 len;
guint str_len;
guint32 ent;
... | CWE-119 | null | null |
41,468 | proto_reg_handoff_pktap(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_PKTAP, pktap_handle);
}
| DoS | 0 | proto_reg_handoff_pktap(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_PKTAP, pktap_handle);
}
| @@ -135,6 +135,9 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
int offset = 0;
guint32 pkt_len, rectype, dlt;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdr;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTAP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -202,8 +205... | CWE-20 | null | null |
41,469 | proto_register_pktap(void)
{
static hf_register_info hf[] = {
{ &hf_pktap_hdrlen,
{ "Header length", "pktap.hdrlen",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_rectype,
{ "Record type", "pktap.rectype",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_dlt,... | DoS | 0 | proto_register_pktap(void)
{
static hf_register_info hf[] = {
{ &hf_pktap_hdrlen,
{ "Header length", "pktap.hdrlen",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_rectype,
{ "Record type", "pktap.rectype",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_dlt,... | @@ -135,6 +135,9 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
int offset = 0;
guint32 pkt_len, rectype, dlt;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdr;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTAP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -202,8 +205... | CWE-20 | null | null |
41,470 | add_ppi_field_header(tvbuff_t *tvb, proto_tree *tree, int *offset)
{
ptvcursor_t *csr;
csr = ptvcursor_new(tree, tvb, *offset);
ptvcursor_add(csr, hf_ppi_field_type, 2, ENC_LITTLE_ENDIAN);
ptvcursor_add(csr, hf_ppi_field_len, 2, ENC_LITTLE_ENDIAN);
ptvcursor_free(csr);
*offset=ptvcursor_current... | DoS | 0 | add_ppi_field_header(tvbuff_t *tvb, proto_tree *tree, int *offset)
{
ptvcursor_t *csr;
csr = ptvcursor_new(tree, tvb, *offset);
ptvcursor_add(csr, hf_ppi_field_type, 2, ENC_LITTLE_ENDIAN);
ptvcursor_add(csr, hf_ppi_field_len, 2, ENC_LITTLE_ENDIAN);
ptvcursor_free(csr);
*offset=ptvcursor_current... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,471 | ampdu_reassemble_cleanup(void)
{
reassembly_table_destroy(&du_reassembly_table);
}
| DoS | 0 | ampdu_reassemble_cleanup(void)
{
reassembly_table_destroy(&du_reassembly_table);
}
| @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,472 | capture_ppi(const guchar *pd, int len, packet_counts *ld)
{
guint32 dlt;
guint ppi_len;
ppi_len = pletoh16(pd+2);
if(ppi_len < PPI_V0_HEADER_LEN || !BYTES_ARE_IN_FRAME(0, len, ppi_len)) {
ld->other++;
return;
}
dlt = pletoh32(pd+4);
/* XXX - We should probably combine ... | DoS | 0 | capture_ppi(const guchar *pd, int len, packet_counts *ld)
{
guint32 dlt;
guint ppi_len;
ppi_len = pletoh16(pd+2);
if(ppi_len < PPI_V0_HEADER_LEN || !BYTES_ARE_IN_FRAME(0, len, ppi_len)) {
ld->other++;
return;
}
dlt = pletoh32(pd+4);
/* XXX - We should probably combine ... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,473 | dissect_80211_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int data_len, struct ieee_802_11_phdr *phdr)
{
proto_tree *ftree;
proto_item *ti;
ptvcursor_t *csr;
guint64 tsft_raw;
guint rate_raw;
guint rate_kbps;
guint32 common_flags;
gui... | DoS | 0 | dissect_80211_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int data_len, struct ieee_802_11_phdr *phdr)
{
proto_tree *ftree;
proto_item *ti;
ptvcursor_t *csr;
guint64 tsft_raw;
guint rate_raw;
guint rate_kbps;
guint32 common_flags;
gui... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,474 | dissect_8023_extension(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int data_len)
{
proto_tree *ftree;
ptvcursor_t *csr;
ftree = proto_tree_add_subtree(tree, tvb, offset, data_len, ett_8023_extension, NULL, "802.3 Extension");
add_ppi_field_header(tvb, ftree, &offset);
data... | DoS | 0 | dissect_8023_extension(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int data_len)
{
proto_tree *ftree;
ptvcursor_t *csr;
ftree = proto_tree_add_subtree(tree, tvb, offset, data_len, ett_8023_extension, NULL, "802.3 Extension");
add_ppi_field_header(tvb, ftree, &offset);
data... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,475 | dissect_aggregation_extension(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int data_len)
{
proto_tree *ftree;
ptvcursor_t *csr;
ftree = proto_tree_add_subtree(tree, tvb, offset, data_len, ett_aggregation_extension, NULL, "Aggregation Extension");
add_ppi_field_header(tvb, ftree,... | DoS | 0 | dissect_aggregation_extension(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int data_len)
{
proto_tree *ftree;
ptvcursor_t *csr;
ftree = proto_tree_add_subtree(tree, tvb, offset, data_len, ett_aggregation_extension, NULL, "Aggregation Extension");
add_ppi_field_header(tvb, ftree,... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,476 | proto_reg_handoff_ppi(void)
{
data_handle = find_dissector("data");
ieee80211_radio_handle = find_dissector("wlan_radio");
ppi_gps_handle = find_dissector("ppi_gps");
ppi_vector_handle = find_dissector("ppi_vector");
ppi_sensor_handle = find_dissector("ppi_sensor");
ppi_antenna_handle = find_dis... | DoS | 0 | proto_reg_handoff_ppi(void)
{
data_handle = find_dissector("data");
ieee80211_radio_handle = find_dissector("wlan_radio");
ppi_gps_handle = find_dissector("ppi_gps");
ppi_vector_handle = find_dissector("ppi_vector");
ppi_sensor_handle = find_dissector("ppi_sensor");
ppi_antenna_handle = find_dis... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,477 | proto_register_ppi(void)
{
static hf_register_info hf[] = {
{ &hf_ppi_head_version,
{ "Version", "ppi.version",
FT_UINT8, BASE_DEC, NULL, 0x0,
"PPI header format version", HFILL } },
{ &hf_ppi_head_flags,
{ "Flags", "ppi.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
"PPI... | DoS | 0 | proto_register_ppi(void)
{
static hf_register_info hf[] = {
{ &hf_ppi_head_version,
{ "Version", "ppi.version",
FT_UINT8, BASE_DEC, NULL, 0x0,
"PPI header format version", HFILL } },
{ &hf_ppi_head_flags,
{ "Flags", "ppi.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
"PPI... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,478 | ptvcursor_add_invalid_check(ptvcursor_t *csr, int hf, gint len, guint64 invalid_val) {
proto_item *ti;
guint64 val = invalid_val;
switch (len) {
case 8:
val = tvb_get_letoh64(ptvcursor_tvbuff(csr),
ptvcursor_current_offset(csr));
break;
case 4:
... | DoS | 0 | ptvcursor_add_invalid_check(ptvcursor_t *csr, int hf, gint len, guint64 invalid_val) {
proto_item *ti;
guint64 val = invalid_val;
switch (len) {
case 8:
val = tvb_get_letoh64(ptvcursor_tvbuff(csr),
ptvcursor_current_offset(csr));
break;
case 4:
... | @@ -857,6 +857,9 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint last_frame = 0;
gint len_remain, /*pad_len = 0,*/ ampdu_len = 0;
struct ieee_802_11_phdr phdr;
+ int wtap_encap;
+ struct eth_phdr eth;
+ void *phdrp;
col_set_str(pinfo... | CWE-20 | null | null |
41,479 | check_rpcap_heur (tvbuff_t *tvb, gboolean tcp)
{
gint offset = 0;
guint8 version, msg_type;
guint16 msg_value;
guint32 plen, len, caplen;
if (tvb_captured_length (tvb) < 8)
/* Too short */
return FALSE;
version = tvb_get_guint8 (tvb, offset);
if (version != 0)
/* Incorrect version */
ret... | DoS | 0 | check_rpcap_heur (tvbuff_t *tvb, gboolean tcp)
{
gint offset = 0;
guint8 version, msg_type;
guint16 msg_value;
guint32 plen, len, caplen;
if (tvb_captured_length (tvb) < 8)
/* Too short */
return FALSE;
version = tvb_get_guint8 (tvb, offset);
if (version != 0)
/* Incorrect version */
ret... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,480 | dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, void* data _U_)
{
proto_tree *tree;
proto_item *ti;
tvbuff_t *new_tvb;
gint len, offset = 0;
guint8 msg_type;
guint16 msg_value;
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(pinfo->cinfo, COL_INFO);
ti = proto_tr... | DoS | 0 | dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, void* data _U_)
{
proto_tree *tree;
proto_item *ti;
tvbuff_t *new_tvb;
gint len, offset = 0;
guint8 msg_type;
guint16 msg_value;
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear(pinfo->cinfo, COL_INFO);
ti = proto_tr... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,481 | dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_item *ti;
gint len;
len = tvb_captured_length_remaining (tvb, offset);
if (len <= 0)
return;
col_append_fstr (pinfo->cinfo, COL_INFO, ": %s",
tvb_format_text_wsp ... | DoS | 0 | dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_item *ti;
gint len;
len = tvb_captured_length_remaining (tvb, offset);
if (len <= 0)
return;
col_append_fstr (pinfo->cinfo, COL_INFO, ": %s",
tvb_format_text_wsp ... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,482 | dissect_rpcap_filter (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint32 nitems, i;
ti = proto_tree_add_item (parent_tree, hf_filter, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree (ti, ett_filter);
proto_tree... | DoS | 0 | dissect_rpcap_filter (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint32 nitems, i;
ti = proto_tree_add_item (parent_tree, hf_filter, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree (ti, ett_filter);
proto_tree... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,483 | dissect_rpcap_filterbpf_insn (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree, *code_tree;
proto_item *ti, *code_ti;
guint8 inst_class;
ti = proto_tree_add_item (parent_tree, hf_filterbpf_insn, tvb, offset, 8, ENC_NA);
tree = proto... | DoS | 0 | dissect_rpcap_filterbpf_insn (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree, *code_tree;
proto_item *ti, *code_ti;
guint8 inst_class;
ti = proto_tree_add_item (parent_tree, hf_filterbpf_insn, tvb, offset, 8, ENC_NA);
tree = proto... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,484 | dissect_rpcap_findalldevs_if (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint16 namelen, desclen, naddr, i;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_if, tvb, offset, -1, EN... | DoS | 0 | dissect_rpcap_findalldevs_if (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint16 namelen, desclen, naddr, i;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_if, tvb, offset, -1, EN... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,485 | dissect_rpcap_findalldevs_ifaddr (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_ifaddr, tvb, offset, -1, ENC_NA);
tree = proto_item... | DoS | 0 | dissect_rpcap_findalldevs_ifaddr (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_ifaddr, tvb, offset, -1, ENC_NA);
tree = proto_item... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,486 | dissect_rpcap_findalldevs_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset, guint16 no_devs)
{
proto_tree *tree;
proto_item *ti;
guint16 i;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_reply, tvb, offset, -1, ENC_NA);
tree = proto_it... | DoS | 0 | dissect_rpcap_findalldevs_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset, guint16 no_devs)
{
proto_tree *tree;
proto_item *ti;
guint16 i;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_reply, tvb, offset, -1, ENC_NA);
tree = proto_it... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,487 | dissect_rpcap_heur_tcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if (check_rpcap_heur (tvb, TRUE)) {
/* This is probably a rpcap tcp package */
tcp_dissect_pdus (tvb, pinfo, tree, rpcap_desegment, 8,
get_rpcap_pdu_len, dissect_rpcap, data);
return TRUE;
}... | DoS | 0 | dissect_rpcap_heur_tcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if (check_rpcap_heur (tvb, TRUE)) {
/* This is probably a rpcap tcp package */
tcp_dissect_pdus (tvb, pinfo, tree, rpcap_desegment, 8,
get_rpcap_pdu_len, dissect_rpcap, data);
return TRUE;
}... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,488 | dissect_rpcap_heur_udp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if (check_rpcap_heur (tvb, FALSE)) {
/* This is probably a rpcap udp package */
dissect_rpcap (tvb, pinfo, tree, data);
return TRUE;
}
return FALSE;
}
| DoS | 0 | dissect_rpcap_heur_udp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if (check_rpcap_heur (tvb, FALSE)) {
/* This is probably a rpcap udp package */
dissect_rpcap (tvb, pinfo, tree, data);
return TRUE;
}
return FALSE;
}
| @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,489 | dissect_rpcap_sampling_request (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint32 value;
guint8 method;
ti = proto_tree_add_item (parent_tree, hf_sampling_request, tvb, offset, -1, ENC_NA);
tree = proto_i... | DoS | 0 | dissect_rpcap_sampling_request (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint32 value;
guint8 method;
ti = proto_tree_add_item (parent_tree, hf_sampling_request, tvb, offset, -1, ENC_NA);
tree = proto_i... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,490 | dissect_rpcap_startcap_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_startcap_reply, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree (ti, ett_startcap_reply)... | DoS | 0 | dissect_rpcap_startcap_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_startcap_reply, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree (ti, ett_startcap_reply)... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,491 | dissect_rpcap_startcap_request (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree, *field_tree;
proto_item *ti, *field_ti;
guint16 flags;
ti = proto_tree_add_item (parent_tree, hf_startcap_request, tvb, offset, -1, ENC_NA);
tree = prot... | DoS | 0 | dissect_rpcap_startcap_request (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree, *field_tree;
proto_item *ti, *field_ti;
guint16 flags;
ti = proto_tree_add_item (parent_tree, hf_startcap_request, tvb, offset, -1, ENC_NA);
tree = prot... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,492 | dissect_rpcap_stats_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_stats_reply, tvb, offset, 16, ENC_NA);
tree = proto_item_add_subtree (ti, ett_stats_reply);
proto_t... | DoS | 0 | dissect_rpcap_stats_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_stats_reply, tvb, offset, 16, ENC_NA);
tree = proto_item_add_subtree (ti, ett_stats_reply);
proto_t... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,493 | get_rpcap_pdu_len (packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
return tvb_get_ntohl (tvb, offset + 4) + 8;
}
| DoS | 0 | get_rpcap_pdu_len (packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
return tvb_get_ntohl (tvb, offset + 4) + 8;
}
| @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,494 | proto_reg_handoff_rpcap (void)
{
static gboolean rpcap_prefs_initialized = FALSE;
if (!rpcap_prefs_initialized) {
data_handle = find_dissector ("data");
rpcap_prefs_initialized = TRUE;
heur_dissector_add ("tcp", dissect_rpcap_heur_tcp, "RPCAP over TCP", "rpcap_tcp", proto_rpcap, HEURISTIC_ENABLE);
... | DoS | 0 | proto_reg_handoff_rpcap (void)
{
static gboolean rpcap_prefs_initialized = FALSE;
if (!rpcap_prefs_initialized) {
data_handle = find_dissector ("data");
rpcap_prefs_initialized = TRUE;
heur_dissector_add ("tcp", dissect_rpcap_heur_tcp, "RPCAP over TCP", "rpcap_tcp", proto_rpcap, HEURISTIC_ENABLE);
... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,495 | proto_register_rpcap (void)
{
static hf_register_info hf[] = {
/* Common header for all messages */
{ &hf_version,
{ "Version", "rpcap.version", FT_UINT8, BASE_DEC,
NULL, 0x0, NULL, HFILL } },
{ &hf_type,
{ "Message type", "rpcap.type", FT_UINT8, BASE_DEC,
VALS(message_type), 0... | DoS | 0 | proto_register_rpcap (void)
{
static hf_register_info hf[] = {
/* Common header for all messages */
{ &hf_version,
{ "Version", "rpcap.version", FT_UINT8, BASE_DEC,
NULL, 0x0, NULL, HFILL } },
{ &hf_type,
{ "Message type", "rpcap.type", FT_UINT8, BASE_DEC,
VALS(message_type), 0... | @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,496 | static void rpcap_frame_end (void)
{
info_added = FALSE;
}
| DoS | 0 | static void rpcap_frame_end (void)
{
info_added = FALSE;
}
| @@ -838,6 +838,8 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
tvbuff_t *new_tvb;
guint caplen, len, frame_no;
gint reported_length_remaining;
+ struct eth_phdr eth;
+ void *phdr;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_NA);
tree = pr... | CWE-20 | null | null |
41,497 | static gboolean info_line(const gchar *line)
{
int i=NETSCREEN_SPACES_ON_INFO_LINE;
while (i-- > 0) {
if (g_ascii_isspace(*line)) {
line++;
continue;
} else {
return FALSE;
}
}
return TRUE;
}
| DoS | 0 | static gboolean info_line(const gchar *line)
{
int i=NETSCREEN_SPACES_ON_INFO_LINE;
while (i-- > 0) {
if (g_ascii_isspace(*line)) {
line++;
continue;
} else {
return FALSE;
}
}
return TRUE;
}
| @@ -69,12 +69,8 @@ static gboolean netscreen_read(wtap *wth, int *err, gchar **err_info,
static gboolean netscreen_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf,
int *err, gchar **err_info);
-static int parse_netscreen_rec_hdr(struct wtap_pkthdr *phdr, const char *line,
- char *cap_in... | CWE-20 | null | null |
41,498 | static gboolean netscreen_check_file_type(wtap *wth, int *err, gchar **err_info)
{
char buf[NETSCREEN_LINE_LENGTH];
guint reclen, line;
buf[NETSCREEN_LINE_LENGTH-1] = '\0';
for (line = 0; line < NETSCREEN_HEADER_LINES_TO_CHECK; line++) {
if (file_gets(buf, NETSCREEN_LINE_LENGTH, wth->fh) == NULL) {
/* EOF or... | DoS | 0 | static gboolean netscreen_check_file_type(wtap *wth, int *err, gchar **err_info)
{
char buf[NETSCREEN_LINE_LENGTH];
guint reclen, line;
buf[NETSCREEN_LINE_LENGTH-1] = '\0';
for (line = 0; line < NETSCREEN_HEADER_LINES_TO_CHECK; line++) {
if (file_gets(buf, NETSCREEN_LINE_LENGTH, wth->fh) == NULL) {
/* EOF or... | @@ -69,12 +69,8 @@ static gboolean netscreen_read(wtap *wth, int *err, gchar **err_info,
static gboolean netscreen_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf,
int *err, gchar **err_info);
-static int parse_netscreen_rec_hdr(struct wtap_pkthdr *phdr, const char *line,
- char *cap_in... | CWE-20 | null | null |
41,499 | wtap_open_return_val netscreen_open(wtap *wth, int *err, gchar **err_info)
{
/* Look for a NetScreen snoop header line */
if (!netscreen_check_file_type(wth, err, err_info)) {
if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
return WTAP_OPEN_ERROR;
return WTAP_OPEN_NOT_MINE;
}
if (file_seek(wth->fh, 0L, SEEK_... | DoS | 0 | wtap_open_return_val netscreen_open(wtap *wth, int *err, gchar **err_info)
{
/* Look for a NetScreen snoop header line */
if (!netscreen_check_file_type(wth, err, err_info)) {
if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
return WTAP_OPEN_ERROR;
return WTAP_OPEN_NOT_MINE;
}
if (file_seek(wth->fh, 0L, SEEK_... | @@ -69,12 +69,8 @@ static gboolean netscreen_read(wtap *wth, int *err, gchar **err_info,
static gboolean netscreen_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf,
int *err, gchar **err_info);
-static int parse_netscreen_rec_hdr(struct wtap_pkthdr *phdr, const char *line,
- char *cap_in... | CWE-20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.