idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
10,700
SmartScheduleTimer (int sig) { SmartScheduleTime += SmartScheduleInterval; }
DoS
0
SmartScheduleTimer (int sig) { SmartScheduleTime += SmartScheduleInterval; }
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,701
System(char *command) { int pid, p; void (*csig)(int); int status; if (!command) return 1; csig = signal(SIGCHLD, SIG_DFL); if (csig == SIG_ERR) { perror("signal"); return -1; } DebugF("System: `%s'\n", command); switch (pid = fork()) { case -1: /* error */ p = -...
DoS
0
System(char *command) { int pid, p; void (*csig)(int); int status; if (!command) return 1; csig = signal(SIGCHLD, SIG_DFL); if (csig == SIG_ERR) { perror("signal"); return -1; } DebugF("System: `%s'\n", command); switch (pid = fork()) { case -1: /* error */ p = -...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,702
UnlockServer(void) { if (nolock) return; if (!StillLocking){ (void) unlink(LockFile); } }
DoS
0
UnlockServer(void) { if (nolock) return; if (!StillLocking){ (void) unlink(LockFile); } }
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,703
void UseMsg(void) { ErrorF("use: X [:<display>] [option]\n"); ErrorF("-a # default pointer acceleration (factor)\n"); ErrorF("-ac disable access control restrictions\n"); ErrorF("-audit int set audit trail level\n"); ErrorF("-auth file se...
DoS
0
void UseMsg(void) { ErrorF("use: X [:<display>] [option]\n"); ErrorF("-a # default pointer acceleration (factor)\n"); ErrorF("-ac disable access control restrictions\n"); ErrorF("-audit int set audit trail level\n"); ErrorF("-auth file se...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,704
XNFstrdup(const char *s) { char *ret; if (s == NULL) return NULL; ret = strdup(s); if (!ret) FatalError("XNFstrdup: Out of memory"); return ret; }
DoS
0
XNFstrdup(const char *s) { char *ret; if (s == NULL) return NULL; ret = strdup(s); if (!ret) FatalError("XNFstrdup: Out of memory"); return ret; }
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,705
Xalloc(unsigned long amount) { /* * Xalloc used to return NULL when large amount of memory is requested. In * order to catch the buggy callers this warning has been added, slated to * removal by anyone who touches this code (or just looks at it) in 2011. * * -- Mikhail Gusarov */ i...
DoS
0
Xalloc(unsigned long amount) { /* * Xalloc used to return NULL when large amount of memory is requested. In * order to catch the buggy callers this warning has been added, slated to * removal by anyone who touches this code (or just looks at it) in 2011. * * -- Mikhail Gusarov */ i...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,706
Xfree(void *ptr) { free(ptr); }
DoS
0
Xfree(void *ptr) { free(ptr); }
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,707
Xrealloc(void *ptr, unsigned long amount) { /* * Xrealloc used to return NULL when large amount of memory is requested. In * order to catch the buggy callers this warning has been added, slated to * removal by anyone who touches this code (or just looks at it) in 2011. * * -- Mikhail Gusaro...
DoS
0
Xrealloc(void *ptr, unsigned long amount) { /* * Xrealloc used to return NULL when large amount of memory is requested. In * order to catch the buggy callers this warning has been added, slated to * removal by anyone who touches this code (or just looks at it) in 2011. * * -- Mikhail Gusaro...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,708
set_font_authorizations(char **authorizations, int *authlen, pointer client) { #define AUTHORIZATION_NAME "hp-hostname-1" #if defined(TCPCONN) || defined(STREAMSCONN) static char *result = NULL; static char *p = NULL; if (p == NULL) { char hname[1024], *hnameptr; unsigned int len; #if defined(IPv6) &...
DoS
0
set_font_authorizations(char **authorizations, int *authlen, pointer client) { #define AUTHORIZATION_NAME "hp-hostname-1" #if defined(TCPCONN) || defined(STREAMSCONN) static char *result = NULL; static char *p = NULL; if (p == NULL) { char hname[1024], *hnameptr; unsigned int len; #if defined(IPv6) &...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,709
xstrtokenize(const char *str, const char *separators) { char **list, **nlist; char *tok, *tmp; unsigned num = 0, n; if (!str) return NULL; list = calloc(1, sizeof(*list)); if (!list) return NULL; tmp = strdup(str); if (!tmp) goto error; for (tok = strtok(tmp,...
DoS
0
xstrtokenize(const char *str, const char *separators) { char **list, **nlist; char *tok, *tmp; unsigned num = 0, n; if (!str) return NULL; list = calloc(1, sizeof(*list)); if (!list) return NULL; tmp = strdup(str); if (!tmp) goto error; for (tok = strtok(tmp,...
@@ -297,7 +297,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); - (void) chmod(tmp, 0444); + (void) fchmod(lfd, 0444); (void) close(lfd); /*
CWE-362
null
null
10,710
CreateColors( char **dataptr, unsigned int *data_size, XpmColor *colors, unsigned int ncolors, unsigned int cpp) { char buf[BUFSIZ]; unsigned int a, key, l; char *s, *s2; char **defaults; /* can ncolors be trusted here? */ for (a = 0; a < ncolors; a++, colors++, data...
DoS Exec Code Overflow
0
CreateColors( char **dataptr, unsigned int *data_size, XpmColor *colors, unsigned int ncolors, unsigned int cpp) { char buf[BUFSIZ]; unsigned int a, key, l; char *s, *s2; char **defaults; /* can ncolors be trusted here? */ for (a = 0; a < ncolors; a++, colors++, data...
@@ -48,7 +48,7 @@ LFUNC(CreatePixels, void, (char **dataptr, unsigned int data_size, unsigned int height, unsigned int cpp, unsigned int *pixels, XpmColor *colors)); -LFUNC(CountExtensions, void, (XpmExtension *ext, unsigned int num, +LFUNC(CountExtensions, int, (XpmExtension *ext, unsigned int num, ...
CWE-787
null
null
10,711
XpmCreateDataFromImage( Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes) { XpmImage xpmimage; XpmInfo info; int ErrorStatus; /* initialize return value */ if (data_return) *data_return = NULL; /* create an Xpm...
DoS Exec Code Overflow
0
XpmCreateDataFromImage( Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes) { XpmImage xpmimage; XpmInfo info; int ErrorStatus; /* initialize return value */ if (data_return) *data_return = NULL; /* create an Xpm...
@@ -48,7 +48,7 @@ LFUNC(CreatePixels, void, (char **dataptr, unsigned int data_size, unsigned int height, unsigned int cpp, unsigned int *pixels, XpmColor *colors)); -LFUNC(CountExtensions, void, (XpmExtension *ext, unsigned int num, +LFUNC(CountExtensions, int, (XpmExtension *ext, unsigned int num, ...
CWE-787
null
null
10,712
static int vrend_decode_create_ve(struct vrend_decode_ctx *ctx, uint32_t handle, uint16_t length) { struct pipe_vertex_element *ve = NULL; int num_elements; int i; int ret; if (length < 1) return EINVAL; if ((length - 1) % 4) return EINVAL; num_elements = (length - 1) / 4; if (nu...
DoS
0
static int vrend_decode_create_ve(struct vrend_decode_ctx *ctx, uint32_t handle, uint16_t length) { struct pipe_vertex_element *ve = NULL; int num_elements; int i; int ret; if (length < 1) return EINVAL; if ((length - 1) % 4) return EINVAL; num_elements = (length - 1) / 4; if (nu...
@@ -1045,6 +1045,10 @@ void vrend_renderer_context_create_internal(uint32_t handle, uint32_t nlen, if (handle >= VREND_MAX_CTX) return; + dctx = dec_ctx[handle]; + if (dctx) + return; + dctx = malloc(sizeof(struct vrend_decode_ctx)); if (!dctx) return;
CWE-399
null
null
10,713
static int vrend_decode_set_framebuffer_state(struct vrend_decode_ctx *ctx, int length) { if (length < 2) return EINVAL; uint32_t nr_cbufs = get_buf_entry(ctx, VIRGL_SET_FRAMEBUFFER_STATE_NR_CBUFS); uint32_t zsurf_handle = get_buf_entry(ctx, VIRGL_SET_FRAMEBUFFER_STATE_NR_ZSURF_HANDLE); uint32_t surf...
DoS
0
static int vrend_decode_set_framebuffer_state(struct vrend_decode_ctx *ctx, int length) { if (length < 2) return EINVAL; uint32_t nr_cbufs = get_buf_entry(ctx, VIRGL_SET_FRAMEBUFFER_STATE_NR_CBUFS); uint32_t zsurf_handle = get_buf_entry(ctx, VIRGL_SET_FRAMEBUFFER_STATE_NR_ZSURF_HANDLE); uint32_t surf...
@@ -1045,6 +1045,10 @@ void vrend_renderer_context_create_internal(uint32_t handle, uint32_t nlen, if (handle >= VREND_MAX_CTX) return; + dctx = dec_ctx[handle]; + if (dctx) + return; + dctx = malloc(sizeof(struct vrend_decode_ctx)); if (!dctx) return;
CWE-399
null
null
10,714
static uint32_t i6300esb_config_read(PCIDevice *dev, uint32_t addr, int len) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); uint32_t data; i6300esb_debug ("addr = %x, len = %d\n", addr, len); if (addr == ESB_CONFIG_REG && len == 2) { data = (d->reboot_enabled ? 0 : ESB_WDT_REBOOT...
DoS
0
static uint32_t i6300esb_config_read(PCIDevice *dev, uint32_t addr, int len) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); uint32_t data; i6300esb_debug ("addr = %x, len = %d\n", addr, len); if (addr == ESB_CONFIG_REG && len == 2) { data = (d->reboot_enabled ? 0 : ESB_WDT_REBOOT...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,715
static void i6300esb_config_write(PCIDevice *dev, uint32_t addr, uint32_t data, int len) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); int old; i6300esb_debug("addr = %x, data = %x, len = %d\n", addr, data, len); if (addr == ESB_CONFIG_REG && len == 2) { d-...
DoS
0
static void i6300esb_config_write(PCIDevice *dev, uint32_t addr, uint32_t data, int len) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); int old; i6300esb_debug("addr = %x, data = %x, len = %d\n", addr, data, len); if (addr == ESB_CONFIG_REG && len == 2) { d-...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,716
static uint32_t i6300esb_mem_readl(void *vp, hwaddr addr) { i6300esb_debug("addr = %x\n", (int) addr); return 0; }
DoS
0
static uint32_t i6300esb_mem_readl(void *vp, hwaddr addr) { i6300esb_debug("addr = %x\n", (int) addr); return 0; }
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,717
static uint32_t i6300esb_mem_readw(void *vp, hwaddr addr) { uint32_t data = 0; I6300State *d = vp; i6300esb_debug("addr = %x\n", (int) addr); if (addr == 0xc) { /* The previous reboot flag is really bit 9, but there is * a bug in the Linux driver where it thinks it's bit 12. ...
DoS
0
static uint32_t i6300esb_mem_readw(void *vp, hwaddr addr) { uint32_t data = 0; I6300State *d = vp; i6300esb_debug("addr = %x\n", (int) addr); if (addr == 0xc) { /* The previous reboot flag is really bit 9, but there is * a bug in the Linux driver where it thinks it's bit 12. ...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,718
static void i6300esb_mem_writeb(void *vp, hwaddr addr, uint32_t val) { I6300State *d = vp; i6300esb_debug("addr = %x, val = %x\n", (int) addr, val); if (addr == 0xc && val == 0x80) d->unlock_state = 1; else if (addr == 0xc && val == 0x86 && d->unlock_state == 1) d->unlock_state = 2; }
DoS
0
static void i6300esb_mem_writeb(void *vp, hwaddr addr, uint32_t val) { I6300State *d = vp; i6300esb_debug("addr = %x, val = %x\n", (int) addr, val); if (addr == 0xc && val == 0x80) d->unlock_state = 1; else if (addr == 0xc && val == 0x86 && d->unlock_state == 1) d->unlock_state = 2; }
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,719
static void i6300esb_mem_writel(void *vp, hwaddr addr, uint32_t val) { I6300State *d = vp; i6300esb_debug ("addr = %x, val = %x\n", (int) addr, val); if (addr == 0xc && val == 0x80) d->unlock_state = 1; else if (addr == 0xc && val == 0x86 && d->unlock_state == 1) d->unlock_state = 2; ...
DoS
0
static void i6300esb_mem_writel(void *vp, hwaddr addr, uint32_t val) { I6300State *d = vp; i6300esb_debug ("addr = %x, val = %x\n", (int) addr, val); if (addr == 0xc && val == 0x80) d->unlock_state = 1; else if (addr == 0xc && val == 0x86 && d->unlock_state == 1) d->unlock_state = 2; ...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,720
static void i6300esb_realize(PCIDevice *dev, Error **errp) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); i6300esb_debug("I6300State = %p\n", d); d->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, i6300esb_timer_expired, d); d->previous_reboot_flag = 0; memory_region_init_io(&d->io_mem, OBJECT(d), &i6...
DoS
0
static void i6300esb_realize(PCIDevice *dev, Error **errp) { I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); i6300esb_debug("I6300State = %p\n", d); d->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, i6300esb_timer_expired, d); d->previous_reboot_flag = 0; memory_region_init_io(&d->io_mem, OBJECT(d), &i6...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,721
static void i6300esb_register_types(void) { watchdog_add_model(&model); type_register_static(&i6300esb_info); }
DoS
0
static void i6300esb_register_types(void) { watchdog_add_model(&model); type_register_static(&i6300esb_info); }
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,722
static void i6300esb_reset(DeviceState *dev) { PCIDevice *pdev = PCI_DEVICE(dev); I6300State *d = WATCHDOG_I6300ESB_DEVICE(pdev); i6300esb_debug("I6300State = %p\n", d); i6300esb_disable_timer(d); /* NB: Don't change d->previous_reboot_flag in this function. */ d->reboot_enabled = 1; d->...
DoS
0
static void i6300esb_reset(DeviceState *dev) { PCIDevice *pdev = PCI_DEVICE(dev); I6300State *d = WATCHDOG_I6300ESB_DEVICE(pdev); i6300esb_debug("I6300State = %p\n", d); i6300esb_disable_timer(d); /* NB: Don't change d->previous_reboot_flag in this function. */ d->reboot_enabled = 1; d->...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,723
static void i6300esb_restart_timer(I6300State *d, int stage) { int64_t timeout; if (!d->enabled) return; d->stage = stage; if (d->stage <= 1) timeout = d->timer1_preload; else timeout = d->timer2_preload; if (d->clock_scale == CLOCK_SCALE_1KHZ) timeout <<= 15;...
DoS
0
static void i6300esb_restart_timer(I6300State *d, int stage) { int64_t timeout; if (!d->enabled) return; d->stage = stage; if (d->stage <= 1) timeout = d->timer1_preload; else timeout = d->timer2_preload; if (d->clock_scale == CLOCK_SCALE_1KHZ) timeout <<= 15;...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,724
static void i6300esb_timer_expired(void *vp) { I6300State *d = vp; i6300esb_debug("stage %d\n", d->stage); if (d->stage == 1) { /* What to do at the end of stage 1? */ switch (d->int_type) { case INT_TYPE_IRQ: fprintf(stderr, "i6300esb_timer_expired: I would send APIC 1...
DoS
0
static void i6300esb_timer_expired(void *vp) { I6300State *d = vp; i6300esb_debug("stage %d\n", d->stage); if (d->stage == 1) { /* What to do at the end of stage 1? */ switch (d->int_type) { case INT_TYPE_IRQ: fprintf(stderr, "i6300esb_timer_expired: I would send APIC 1...
@@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp) /* qemu_register_coalesced_mmio (addr, 0x10); ? */ } +static void i6300esb_exit(PCIDevice *dev) +{ + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); + + timer_del(d->timer); + timer_free(d->timer); +} + static WatchdogTimer...
CWE-399
null
null
10,725
static void jsR_callcfunction(js_State *J, int n, int min, js_CFunction F) { int i; js_Value v; for (i = n; i < min; ++i) js_pushundefined(J); F(J); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); }
Overflow
0
static void jsR_callcfunction(js_State *J, int n, int min, js_CFunction F) { int i; js_Value v; for (i = n; i < min; ++i) js_pushundefined(J); F(J); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,726
static void jsR_callfunction(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; int i; scope = jsR_newenvironment(J, jsV_newobject(J, JS_COBJECT, NULL), scope); jsR_savescope(J, scope); if (F->arguments) { js_newobject(J); if (!J->strict) { js_currentfunction(J); js_defproperty(J...
Overflow
0
static void jsR_callfunction(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; int i; scope = jsR_newenvironment(J, jsV_newobject(J, JS_COBJECT, NULL), scope); jsR_savescope(J, scope); if (F->arguments) { js_newobject(J); if (!J->strict) { js_currentfunction(J); js_defproperty(J...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,727
static void jsR_callscript(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; if (scope) jsR_savescope(J, scope); js_pop(J, n); jsR_run(J, F); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); if (scope) jsR_restorescope(J); }
Overflow
0
static void jsR_callscript(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; if (scope) jsR_savescope(J, scope); js_pop(J, n); jsR_run(J, F); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); if (scope) jsR_restorescope(J); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,728
static void jsR_defproperty(js_State *J, js_Object *obj, const char *name, int atts, js_Value *value, js_Object *getter, js_Object *setter) { js_Property *ref; int k; if (obj->type == JS_CARRAY) { if (!strcmp(name, "length")) goto readonly; } else if (obj->type == JS_CSTRING) { if (!strcmp(name, "length"...
Overflow
0
static void jsR_defproperty(js_State *J, js_Object *obj, const char *name, int atts, js_Value *value, js_Object *getter, js_Object *setter) { js_Property *ref; int k; if (obj->type == JS_CARRAY) { if (!strcmp(name, "length")) goto readonly; } else if (obj->type == JS_CSTRING) { if (!strcmp(name, "length"...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,729
static int jsR_delproperty(js_State *J, js_Object *obj, const char *name) { js_Property *ref; int k; if (obj->type == JS_CARRAY) { if (!strcmp(name, "length")) goto dontconf; } else if (obj->type == JS_CSTRING) { if (!strcmp(name, "length")) goto dontconf; if (js_isarrayindex(J, name, &k)) if (js_...
Overflow
0
static int jsR_delproperty(js_State *J, js_Object *obj, const char *name) { js_Property *ref; int k; if (obj->type == JS_CARRAY) { if (!strcmp(name, "length")) goto dontconf; } else if (obj->type == JS_CSTRING) { if (!strcmp(name, "length")) goto dontconf; if (js_isarrayindex(J, name, &k)) if (js_...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,730
static void jsR_dumpstack(js_State *J) { int i; printf("stack {\n"); for (i = 0; i < TOP; ++i) { putchar(i == BOT ? '>' : ' '); printf("% 4d: ", i); js_dumpvalue(J, STACK[i]); putchar('\n'); } printf("}\n"); }
Overflow
0
static void jsR_dumpstack(js_State *J) { int i; printf("stack {\n"); for (i = 0; i < TOP; ++i) { putchar(i == BOT ? '>' : ' '); printf("% 4d: ", i); js_dumpvalue(J, STACK[i]); putchar('\n'); } printf("}\n"); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,731
static void jsR_getproperty(js_State *J, js_Object *obj, const char *name) { if (!jsR_hasproperty(J, obj, name)) js_pushundefined(J); }
Overflow
0
static void jsR_getproperty(js_State *J, js_Object *obj, const char *name) { if (!jsR_hasproperty(J, obj, name)) js_pushundefined(J); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,732
js_Environment *jsR_newenvironment(js_State *J, js_Object *vars, js_Environment *outer) { js_Environment *E = js_malloc(J, sizeof *E); E->gcmark = 0; E->gcnext = J->gcenv; J->gcenv = E; ++J->gccounter; E->outer = outer; E->variables = vars; return E; }
Overflow
0
js_Environment *jsR_newenvironment(js_State *J, js_Object *vars, js_Environment *outer) { js_Environment *E = js_malloc(J, sizeof *E); E->gcmark = 0; E->gcnext = J->gcenv; J->gcenv = E; ++J->gccounter; E->outer = outer; E->variables = vars; return E; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,733
static void jsR_run(js_State *J, js_Function *F) { js_Function **FT = F->funtab; double *NT = F->numtab; const char **ST = F->strtab; js_Instruction *pcstart = F->code; js_Instruction *pc = F->code; enum js_OpCode opcode; int offset; const char *str; js_Object *obj; double x, y; unsigned int ux, uy; int ix...
Overflow
0
static void jsR_run(js_State *J, js_Function *F) { js_Function **FT = F->funtab; double *NT = F->numtab; const char **ST = F->strtab; js_Instruction *pcstart = F->code; js_Instruction *pc = F->code; enum js_OpCode opcode; int offset; const char *str; js_Object *obj; double x, y; unsigned int ux, uy; int ix...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,734
static js_Object *jsR_tofunction(js_State *J, int idx) { js_Value *v = stackidx(J, idx); if (v->type == JS_TUNDEFINED || v->type == JS_TNULL) return NULL; if (v->type == JS_TOBJECT) if (v->u.object->type == JS_CFUNCTION || v->u.object->type == JS_CCFUNCTION) return v->u.object; js_typeerror(J, "not a functio...
Overflow
0
static js_Object *jsR_tofunction(js_State *J, int idx) { js_Value *v = stackidx(J, idx); if (v->type == JS_TUNDEFINED || v->type == JS_TNULL) return NULL; if (v->type == JS_TOBJECT) if (v->u.object->type == JS_CFUNCTION || v->u.object->type == JS_CCFUNCTION) return v->u.object; js_typeerror(J, "not a functio...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,735
void js_construct(js_State *J, int n) { js_Object *obj; js_Object *prototype; js_Object *newobj; if (!js_iscallable(J, -n-1)) js_typeerror(J, "called object is not a function"); obj = js_toobject(J, -n-1); /* built-in constructors create their own objects, give them a 'null' this */ if (obj->type == JS_CCFU...
Overflow
0
void js_construct(js_State *J, int n) { js_Object *obj; js_Object *prototype; js_Object *newobj; if (!js_iscallable(J, -n-1)) js_typeerror(J, "called object is not a function"); obj = js_toobject(J, -n-1); /* built-in constructors create their own objects, give them a 'null' this */ if (obj->type == JS_CCFU...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,736
void js_defaccessor(js_State *J, int idx, const char *name, int atts) { jsR_defproperty(J, js_toobject(J, idx), name, atts, NULL, jsR_tofunction(J, -2), jsR_tofunction(J, -1)); js_pop(J, 2); }
Overflow
0
void js_defaccessor(js_State *J, int idx, const char *name, int atts) { jsR_defproperty(J, js_toobject(J, idx), name, atts, NULL, jsR_tofunction(J, -2), jsR_tofunction(J, -1)); js_pop(J, 2); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,737
void js_defproperty(js_State *J, int idx, const char *name, int atts) { jsR_defproperty(J, js_toobject(J, idx), name, atts, stackidx(J, -1), NULL, NULL); js_pop(J, 1); }
Overflow
0
void js_defproperty(js_State *J, int idx, const char *name, int atts) { jsR_defproperty(J, js_toobject(J, idx), name, atts, stackidx(J, -1), NULL, NULL); js_pop(J, 1); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,738
static void js_defvar(js_State *J, const char *name) { jsR_defproperty(J, J->E->variables, name, JS_DONTENUM | JS_DONTCONF, NULL, NULL, NULL); }
Overflow
0
static void js_defvar(js_State *J, const char *name) { jsR_defproperty(J, J->E->variables, name, JS_DONTENUM | JS_DONTCONF, NULL, NULL, NULL); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,739
void js_delregistry(js_State *J, const char *name) { jsR_delproperty(J, J->R, name); }
Overflow
0
void js_delregistry(js_State *J, const char *name) { jsR_delproperty(J, J->R, name); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,740
static int js_delvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getownproperty(J, E->variables, name); if (ref) { if (ref->atts & JS_DONTCONF) { if (J->strict) js_typeerror(J, "'%s' is non-configurable", name); return 0; } jsV_delproperty(J, E->var...
Overflow
0
static int js_delvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getownproperty(J, E->variables, name); if (ref) { if (ref->atts & JS_DONTCONF) { if (J->strict) js_typeerror(J, "'%s' is non-configurable", name); return 0; } jsV_delproperty(J, E->var...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,741
void js_dup(js_State *J) { CHECKSTACK(1); STACK[TOP] = STACK[TOP-1]; ++TOP; }
Overflow
0
void js_dup(js_State *J) { CHECKSTACK(1); STACK[TOP] = STACK[TOP-1]; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,742
void js_dup2(js_State *J) { CHECKSTACK(2); STACK[TOP] = STACK[TOP-2]; STACK[TOP+1] = STACK[TOP-1]; TOP += 2; }
Overflow
0
void js_dup2(js_State *J) { CHECKSTACK(2); STACK[TOP] = STACK[TOP-2]; STACK[TOP+1] = STACK[TOP-1]; TOP += 2; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,743
void js_free(js_State *J, void *ptr) { J->alloc(J->actx, ptr, 0); }
Overflow
0
void js_free(js_State *J, void *ptr) { J->alloc(J->actx, ptr, 0); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,744
void js_getproperty(js_State *J, int idx, const char *name) { jsR_getproperty(J, js_toobject(J, idx), name); }
Overflow
0
void js_getproperty(js_State *J, int idx, const char *name) { jsR_getproperty(J, js_toobject(J, idx), name); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,745
void js_getregistry(js_State *J, const char *name) { jsR_getproperty(J, J->R, name); }
Overflow
0
void js_getregistry(js_State *J, const char *name) { jsR_getproperty(J, J->R, name); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,746
int js_gettop(js_State *J) { return TOP - BOT; }
Overflow
0
int js_gettop(js_State *J) { return TOP - BOT; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,747
int js_hasproperty(js_State *J, int idx, const char *name) { return jsR_hasproperty(J, js_toobject(J, idx), name); }
Overflow
0
int js_hasproperty(js_State *J, int idx, const char *name) { return jsR_hasproperty(J, js_toobject(J, idx), name); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,748
static int js_hasvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getproperty(J, E->variables, name); if (ref) { if (ref->getter) { js_pushobject(J, ref->getter); js_pushobject(J, E->variables); js_call(J, 0); } else { js_pushvalue(J, ref->value); ...
Overflow
0
static int js_hasvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getproperty(J, E->variables, name); if (ref) { if (ref->getter) { js_pushobject(J, ref->getter); js_pushobject(J, E->variables); js_call(J, 0); } else { js_pushvalue(J, ref->value); ...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,749
static void js_initvar(js_State *J, const char *name, int idx) { jsR_defproperty(J, J->E->variables, name, JS_DONTENUM | JS_DONTCONF, stackidx(J, idx), NULL, NULL); }
Overflow
0
static void js_initvar(js_State *J, const char *name, int idx) { jsR_defproperty(J, J->E->variables, name, JS_DONTENUM | JS_DONTCONF, stackidx(J, idx), NULL, NULL); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,750
int js_isarray(js_State *J, int idx) { js_Value *v = stackidx(J, idx); return v->type == JS_TOBJECT && v->u.object->type == JS_CARRAY; }
Overflow
0
int js_isarray(js_State *J, int idx) { js_Value *v = stackidx(J, idx); return v->type == JS_TOBJECT && v->u.object->type == JS_CARRAY; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,751
int js_isarrayindex(js_State *J, const char *str, int *idx) { char buf[32]; *idx = jsV_numbertointeger(jsV_stringtonumber(J, str)); sprintf(buf, "%u", *idx); return !strcmp(buf, str); }
Overflow
0
int js_isarrayindex(js_State *J, const char *str, int *idx) { char buf[32]; *idx = jsV_numbertointeger(jsV_stringtonumber(J, str)); sprintf(buf, "%u", *idx); return !strcmp(buf, str); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,752
int js_iscoercible(js_State *J, int idx) { js_Value *v = stackidx(J, idx); return v->type != JS_TUNDEFINED && v->type != JS_TNULL; }
Overflow
0
int js_iscoercible(js_State *J, int idx) { js_Value *v = stackidx(J, idx); return v->type != JS_TUNDEFINED && v->type != JS_TNULL; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,753
int js_isdefined(js_State *J, int idx) { return stackidx(J, idx)->type != JS_TUNDEFINED; }
Overflow
0
int js_isdefined(js_State *J, int idx) { return stackidx(J, idx)->type != JS_TUNDEFINED; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,754
int js_isnumber(js_State *J, int idx) { return stackidx(J, idx)->type == JS_TNUMBER; }
Overflow
0
int js_isnumber(js_State *J, int idx) { return stackidx(J, idx)->type == JS_TNUMBER; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,755
int js_isobject(js_State *J, int idx) { return stackidx(J, idx)->type == JS_TOBJECT; }
Overflow
0
int js_isobject(js_State *J, int idx) { return stackidx(J, idx)->type == JS_TOBJECT; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,756
int js_isstring(js_State *J, int idx) { enum js_Type t = stackidx(J, idx)->type; return t == JS_TSHRSTR || t == JS_TLITSTR || t == JS_TMEMSTR; }
Overflow
0
int js_isstring(js_State *J, int idx) { enum js_Type t = stackidx(J, idx)->type; return t == JS_TSHRSTR || t == JS_TLITSTR || t == JS_TMEMSTR; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,757
int js_isuserdata(js_State *J, int idx, const char *tag) { js_Value *v = stackidx(J, idx); if (v->type == JS_TOBJECT && v->u.object->type == JS_CUSERDATA) return !strcmp(tag, v->u.object->u.user.tag); return 0; }
Overflow
0
int js_isuserdata(js_State *J, int idx, const char *tag) { js_Value *v = stackidx(J, idx); if (v->type == JS_TOBJECT && v->u.object->type == JS_CUSERDATA) return !strcmp(tag, v->u.object->u.user.tag); return 0; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,758
void *js_malloc(js_State *J, int size) { void *ptr = J->alloc(J->actx, NULL, size); if (!ptr) js_outofmemory(J); return ptr; }
Overflow
0
void *js_malloc(js_State *J, int size) { void *ptr = J->alloc(J->actx, NULL, size); if (!ptr) js_outofmemory(J); return ptr; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,759
static void js_outofmemory(js_State *J) { STACK[TOP].type = JS_TLITSTR; STACK[TOP].u.litstr = "out of memory"; ++TOP; js_throw(J); }
Overflow
0
static void js_outofmemory(js_State *J) { STACK[TOP].type = JS_TLITSTR; STACK[TOP].u.litstr = "out of memory"; ++TOP; js_throw(J); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,760
int js_pcall(js_State *J, int n) { int savetop = TOP - n - 2; if (js_try(J)) { /* clean up the stack to only hold the error object */ STACK[savetop] = STACK[TOP-1]; TOP = savetop + 1; return 1; } js_call(J, n); js_endtry(J); return 0; }
Overflow
0
int js_pcall(js_State *J, int n) { int savetop = TOP - n - 2; if (js_try(J)) { /* clean up the stack to only hold the error object */ STACK[savetop] = STACK[TOP-1]; TOP = savetop + 1; return 1; } js_call(J, n); js_endtry(J); return 0; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,761
int js_pconstruct(js_State *J, int n) { int savetop = TOP - n - 2; if (js_try(J)) { /* clean up the stack to only hold the error object */ STACK[savetop] = STACK[TOP-1]; TOP = savetop + 1; return 1; } js_construct(J, n); js_endtry(J); return 0; }
Overflow
0
int js_pconstruct(js_State *J, int n) { int savetop = TOP - n - 2; if (js_try(J)) { /* clean up the stack to only hold the error object */ STACK[savetop] = STACK[TOP-1]; TOP = savetop + 1; return 1; } js_construct(J, n); js_endtry(J); return 0; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,762
void js_pop(js_State *J, int n) { TOP -= n; if (TOP < BOT) { TOP = BOT; js_error(J, "stack underflow!"); } }
Overflow
0
void js_pop(js_State *J, int n) { TOP -= n; if (TOP < BOT) { TOP = BOT; js_error(J, "stack underflow!"); } }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,763
void js_pushboolean(js_State *J, int v) { CHECKSTACK(1); STACK[TOP].type = JS_TBOOLEAN; STACK[TOP].u.boolean = !!v; ++TOP; }
Overflow
0
void js_pushboolean(js_State *J, int v) { CHECKSTACK(1); STACK[TOP].type = JS_TBOOLEAN; STACK[TOP].u.boolean = !!v; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,764
void js_pushglobal(js_State *J) { js_pushobject(J, J->G); }
Overflow
0
void js_pushglobal(js_State *J) { js_pushobject(J, J->G); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,765
void js_pushiterator(js_State *J, int idx, int own) { js_pushobject(J, jsV_newiterator(J, js_toobject(J, idx), own)); }
Overflow
0
void js_pushiterator(js_State *J, int idx, int own) { js_pushobject(J, jsV_newiterator(J, js_toobject(J, idx), own)); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,766
void js_pushlstring(js_State *J, const char *v, int n) { CHECKSTACK(1); if (n <= soffsetof(js_Value, type)) { char *s = STACK[TOP].u.shrstr; while (n--) *s++ = *v++; *s = 0; STACK[TOP].type = JS_TSHRSTR; } else { STACK[TOP].type = JS_TMEMSTR; STACK[TOP].u.memstr = jsV_newmemstring(J, v, n); } ++TOP; }
Overflow
0
void js_pushlstring(js_State *J, const char *v, int n) { CHECKSTACK(1); if (n <= soffsetof(js_Value, type)) { char *s = STACK[TOP].u.shrstr; while (n--) *s++ = *v++; *s = 0; STACK[TOP].type = JS_TSHRSTR; } else { STACK[TOP].type = JS_TMEMSTR; STACK[TOP].u.memstr = jsV_newmemstring(J, v, n); } ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,767
void js_pushnull(js_State *J) { CHECKSTACK(1); STACK[TOP].type = JS_TNULL; ++TOP; }
Overflow
0
void js_pushnull(js_State *J) { CHECKSTACK(1); STACK[TOP].type = JS_TNULL; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,768
void js_pushnumber(js_State *J, double v) { CHECKSTACK(1); STACK[TOP].type = JS_TNUMBER; STACK[TOP].u.number = v; ++TOP; }
Overflow
0
void js_pushnumber(js_State *J, double v) { CHECKSTACK(1); STACK[TOP].type = JS_TNUMBER; STACK[TOP].u.number = v; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,769
void js_pushobject(js_State *J, js_Object *v) { CHECKSTACK(1); STACK[TOP].type = JS_TOBJECT; STACK[TOP].u.object = v; ++TOP; }
Overflow
0
void js_pushobject(js_State *J, js_Object *v) { CHECKSTACK(1); STACK[TOP].type = JS_TOBJECT; STACK[TOP].u.object = v; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,770
static void js_pushrune(js_State *J, Rune rune) { char buf[UTFmax + 1]; if (rune > 0) { buf[runetochar(buf, &rune)] = 0; js_pushstring(J, buf); } else { js_pushundefined(J); } }
Overflow
0
static void js_pushrune(js_State *J, Rune rune) { char buf[UTFmax + 1]; if (rune > 0) { buf[runetochar(buf, &rune)] = 0; js_pushstring(J, buf); } else { js_pushundefined(J); } }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,771
void js_pushstring(js_State *J, const char *v) { int n = strlen(v); CHECKSTACK(1); if (n <= soffsetof(js_Value, type)) { char *s = STACK[TOP].u.shrstr; while (n--) *s++ = *v++; *s = 0; STACK[TOP].type = JS_TSHRSTR; } else { STACK[TOP].type = JS_TMEMSTR; STACK[TOP].u.memstr = jsV_newmemstring(J, v, n); ...
Overflow
0
void js_pushstring(js_State *J, const char *v) { int n = strlen(v); CHECKSTACK(1); if (n <= soffsetof(js_Value, type)) { char *s = STACK[TOP].u.shrstr; while (n--) *s++ = *v++; *s = 0; STACK[TOP].type = JS_TSHRSTR; } else { STACK[TOP].type = JS_TMEMSTR; STACK[TOP].u.memstr = jsV_newmemstring(J, v, n); ...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,772
void js_pushundefinedthis(js_State *J) { if (J->strict) js_pushundefined(J); else js_pushobject(J, J->G); }
Overflow
0
void js_pushundefinedthis(js_State *J) { if (J->strict) js_pushundefined(J); else js_pushobject(J, J->G); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,773
void js_pushvalue(js_State *J, js_Value v) { CHECKSTACK(1); STACK[TOP] = v; ++TOP; }
Overflow
0
void js_pushvalue(js_State *J, js_Value v) { CHECKSTACK(1); STACK[TOP] = v; ++TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,774
void *js_realloc(js_State *J, void *ptr, int size) { ptr = J->alloc(J->actx, ptr, size); if (!ptr) js_outofmemory(J); return ptr; }
Overflow
0
void *js_realloc(js_State *J, void *ptr, int size) { ptr = J->alloc(J->actx, ptr, size); if (!ptr) js_outofmemory(J); return ptr; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,775
const char *js_ref(js_State *J) { js_Value *v = stackidx(J, -1); const char *s; char buf[32]; switch (v->type) { case JS_TUNDEFINED: s = "_Undefined"; break; case JS_TNULL: s = "_Null"; break; case JS_TBOOLEAN: s = v->u.boolean ? "_True" : "_False"; break; case JS_TOBJECT: sprintf(buf, "%p", (void*)v->u.o...
Overflow
0
const char *js_ref(js_State *J) { js_Value *v = stackidx(J, -1); const char *s; char buf[32]; switch (v->type) { case JS_TUNDEFINED: s = "_Undefined"; break; case JS_TNULL: s = "_Null"; break; case JS_TBOOLEAN: s = v->u.boolean ? "_True" : "_False"; break; case JS_TOBJECT: sprintf(buf, "%p", (void*)v->u.o...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,776
void js_remove(js_State *J, int idx) { idx = idx < 0 ? TOP + idx : BOT + idx; if (idx < BOT || idx >= TOP) js_error(J, "stack error!"); for (;idx < TOP - 1; ++idx) STACK[idx] = STACK[idx+1]; --TOP; }
Overflow
0
void js_remove(js_State *J, int idx) { idx = idx < 0 ? TOP + idx : BOT + idx; if (idx < BOT || idx >= TOP) js_error(J, "stack error!"); for (;idx < TOP - 1; ++idx) STACK[idx] = STACK[idx+1]; --TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,777
void js_replace(js_State* J, int idx) { idx = idx < 0 ? TOP + idx : BOT + idx; if (idx < BOT || idx >= TOP) js_error(J, "stack error!"); STACK[idx] = STACK[--TOP]; }
Overflow
0
void js_replace(js_State* J, int idx) { idx = idx < 0 ? TOP + idx : BOT + idx; if (idx < BOT || idx >= TOP) js_error(J, "stack error!"); STACK[idx] = STACK[--TOP]; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,778
void js_rot(js_State *J, int n) { int i; js_Value tmp = STACK[TOP-1]; for (i = 1; i < n; ++i) STACK[TOP-i] = STACK[TOP-i-1]; STACK[TOP-i] = tmp; }
Overflow
0
void js_rot(js_State *J, int n) { int i; js_Value tmp = STACK[TOP-1]; for (i = 1; i < n; ++i) STACK[TOP-i] = STACK[TOP-i-1]; STACK[TOP-i] = tmp; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,779
void js_rot2(js_State *J) { /* A B -> B A */ js_Value tmp = STACK[TOP-1]; /* A B (B) */ STACK[TOP-1] = STACK[TOP-2]; /* A A */ STACK[TOP-2] = tmp; /* B A */ }
Overflow
0
void js_rot2(js_State *J) { /* A B -> B A */ js_Value tmp = STACK[TOP-1]; /* A B (B) */ STACK[TOP-1] = STACK[TOP-2]; /* A A */ STACK[TOP-2] = tmp; /* B A */ }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,780
void js_rot2pop1(js_State *J) { /* A B -> B */ STACK[TOP-2] = STACK[TOP-1]; --TOP; }
Overflow
0
void js_rot2pop1(js_State *J) { /* A B -> B */ STACK[TOP-2] = STACK[TOP-1]; --TOP; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,781
void js_rot3(js_State *J) { /* A B C -> C A B */ js_Value tmp = STACK[TOP-1]; /* A B C (C) */ STACK[TOP-1] = STACK[TOP-2]; /* A B B */ STACK[TOP-2] = STACK[TOP-3]; /* A A B */ STACK[TOP-3] = tmp; /* C A B */ }
Overflow
0
void js_rot3(js_State *J) { /* A B C -> C A B */ js_Value tmp = STACK[TOP-1]; /* A B C (C) */ STACK[TOP-1] = STACK[TOP-2]; /* A B B */ STACK[TOP-2] = STACK[TOP-3]; /* A A B */ STACK[TOP-3] = tmp; /* C A B */ }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,782
void js_rot3pop2(js_State *J) { /* A B C -> C */ STACK[TOP-3] = STACK[TOP-1]; TOP -= 2; }
Overflow
0
void js_rot3pop2(js_State *J) { /* A B C -> C */ STACK[TOP-3] = STACK[TOP-1]; TOP -= 2; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,783
void *js_savetry(js_State *J) { if (J->trytop == JS_TRYLIMIT) js_error(J, "try: exception stack overflow"); J->trybuf[J->trytop].E = J->E; J->trybuf[J->trytop].envtop = J->envtop; J->trybuf[J->trytop].tracetop = J->tracetop; J->trybuf[J->trytop].top = J->top; J->trybuf[J->trytop].bot = J->bot; J->trybuf[J->try...
Overflow
0
void *js_savetry(js_State *J) { if (J->trytop == JS_TRYLIMIT) js_error(J, "try: exception stack overflow"); J->trybuf[J->trytop].E = J->E; J->trybuf[J->trytop].envtop = J->envtop; J->trybuf[J->trytop].tracetop = J->tracetop; J->trybuf[J->trytop].top = J->top; J->trybuf[J->trytop].bot = J->bot; J->trybuf[J->try...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,784
void *js_savetrypc(js_State *J, js_Instruction *pc) { if (J->trytop == JS_TRYLIMIT) js_error(J, "try: exception stack overflow"); J->trybuf[J->trytop].E = J->E; J->trybuf[J->trytop].envtop = J->envtop; J->trybuf[J->trytop].tracetop = J->tracetop; J->trybuf[J->trytop].top = J->top; J->trybuf[J->trytop].bot = J->...
Overflow
0
void *js_savetrypc(js_State *J, js_Instruction *pc) { if (J->trytop == JS_TRYLIMIT) js_error(J, "try: exception stack overflow"); J->trybuf[J->trytop].E = J->E; J->trybuf[J->trytop].envtop = J->envtop; J->trybuf[J->trytop].tracetop = J->tracetop; J->trybuf[J->trytop].top = J->top; J->trybuf[J->trytop].bot = J->...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,785
void js_setglobal(js_State *J, const char *name) { jsR_setproperty(J, J->G, name); js_pop(J, 1); }
Overflow
0
void js_setglobal(js_State *J, const char *name) { jsR_setproperty(J, J->G, name); js_pop(J, 1); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,786
void js_setproperty(js_State *J, int idx, const char *name) { jsR_setproperty(J, js_toobject(J, idx), name); js_pop(J, 1); }
Overflow
0
void js_setproperty(js_State *J, int idx, const char *name) { jsR_setproperty(J, js_toobject(J, idx), name); js_pop(J, 1); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,787
void js_setregistry(js_State *J, const char *name) { jsR_setproperty(J, J->R, name); js_pop(J, 1); }
Overflow
0
void js_setregistry(js_State *J, const char *name) { jsR_setproperty(J, J->R, name); js_pop(J, 1); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,788
static void js_setvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getproperty(J, E->variables, name); if (ref) { if (ref->setter) { js_pushobject(J, ref->setter); js_pushobject(J, E->variables); js_copy(J, -3); js_call(J, 1); js_pop(J, 1); retu...
Overflow
0
static void js_setvar(js_State *J, const char *name) { js_Environment *E = J->E; do { js_Property *ref = jsV_getproperty(J, E->variables, name); if (ref) { if (ref->setter) { js_pushobject(J, ref->setter); js_pushobject(J, E->variables); js_copy(J, -3); js_call(J, 1); js_pop(J, 1); retu...
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,789
static void js_stackoverflow(js_State *J) { STACK[TOP].type = JS_TLITSTR; STACK[TOP].u.litstr = "stack overflow"; ++TOP; js_throw(J); }
Overflow
0
static void js_stackoverflow(js_State *J) { STACK[TOP].type = JS_TLITSTR; STACK[TOP].u.litstr = "stack overflow"; ++TOP; js_throw(J); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,790
char *js_strdup(js_State *J, const char *s) { int n = strlen(s) + 1; char *p = js_malloc(J, n); memcpy(p, s, n); return p; }
Overflow
0
char *js_strdup(js_State *J, const char *s) { int n = strlen(s) + 1; char *p = js_malloc(J, n); memcpy(p, s, n); return p; }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,791
int js_toboolean(js_State *J, int idx) { return jsV_toboolean(J, stackidx(J, idx)); }
Overflow
0
int js_toboolean(js_State *J, int idx) { return jsV_toboolean(J, stackidx(J, idx)); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,792
short js_toint16(js_State *J, int idx) { return jsV_numbertoint16(jsV_tonumber(J, stackidx(J, idx))); }
Overflow
0
short js_toint16(js_State *J, int idx) { return jsV_numbertoint16(jsV_tonumber(J, stackidx(J, idx))); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,793
int js_toint32(js_State *J, int idx) { return jsV_numbertoint32(jsV_tonumber(J, stackidx(J, idx))); }
Overflow
0
int js_toint32(js_State *J, int idx) { return jsV_numbertoint32(jsV_tonumber(J, stackidx(J, idx))); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,794
int js_tointeger(js_State *J, int idx) { return jsV_numbertointeger(jsV_tonumber(J, stackidx(J, idx))); }
Overflow
0
int js_tointeger(js_State *J, int idx) { return jsV_numbertointeger(jsV_tonumber(J, stackidx(J, idx))); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,795
double js_tonumber(js_State *J, int idx) { return jsV_tonumber(J, stackidx(J, idx)); }
Overflow
0
double js_tonumber(js_State *J, int idx) { return jsV_tonumber(J, stackidx(J, idx)); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,796
js_Object *js_toobject(js_State *J, int idx) { return jsV_toobject(J, stackidx(J, idx)); }
Overflow
0
js_Object *js_toobject(js_State *J, int idx) { return jsV_toobject(J, stackidx(J, idx)); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,797
void js_toprimitive(js_State *J, int idx, int hint) { jsV_toprimitive(J, stackidx(J, idx), hint); }
Overflow
0
void js_toprimitive(js_State *J, int idx, int hint) { jsV_toprimitive(J, stackidx(J, idx), hint); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,798
const char *js_tostring(js_State *J, int idx) { return jsV_tostring(J, stackidx(J, idx)); }
Overflow
0
const char *js_tostring(js_State *J, int idx) { return jsV_tostring(J, stackidx(J, idx)); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null
10,799
unsigned short js_touint16(js_State *J, int idx) { return jsV_numbertouint16(jsV_tonumber(J, stackidx(J, idx))); }
Overflow
0
unsigned short js_touint16(js_State *J, int idx) { return jsV_numbertouint16(jsV_tonumber(J, stackidx(J, idx))); }
@@ -937,7 +937,7 @@ static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environmen jsR_savescope(J, scope); if (n > F->numparams) { - js_pop(J, F->numparams - n); + js_pop(J, n - F->numparams); n = F->numparams; } for (i = n...
CWE-119
null
null