idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
1,400
void IRCView::findNextText() { emit doSearchNext(); }
DoS
0
void IRCView::findNextText() { emit doSearchNext(); }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,401
void IRCView::findPreviousText() { emit doSearchPrevious(); }
DoS
0
void IRCView::findPreviousText() { emit doSearchPrevious(); }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,402
void IRCView::findText() { emit doSearch(); }
DoS
0
void IRCView::findText() { emit doSearch(); }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,403
QTextCharFormat IRCView::getFormat(ObjectFormats x) { QTextCharFormat f; f.setObjectType(x); return f; }
DoS
0
QTextCharFormat IRCView::getFormat(ObjectFormats x) { QTextCharFormat f; f.setObjectType(x); return f; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,404
QString IRCView::ircTextToHtml(const QString& text, bool parseURL, const QString& defaultColor, const QString& whoSent, bool closeAllTags, QChar::Direction* direction) { TextHtmlData data; data.defaultColor = defaultColor; QString htmlText(text); bool allowColors = Prefer...
DoS
0
QString IRCView::ircTextToHtml(const QString& text, bool parseURL, const QString& defaultColor, const QString& whoSent, bool closeAllTags, QChar::Direction* direction) { TextHtmlData data; data.defaultColor = defaultColor; QString htmlText(text); bool allowColors = Prefer...
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,405
bool IRCView::lastBlockIsLine(int select) { Burr *b = dynamic_cast<Burr*>(document()->lastBlock().userData()); int state = -1; if (b) state = b->m_format; if (select == -1) return (state == BlockIsRemember || state == BlockIsMarker); return state == select; }
DoS
0
bool IRCView::lastBlockIsLine(int select) { Burr *b = dynamic_cast<Burr*>(document()->lastBlock().userData()); int state = -1; if (b) state = b->m_format; if (select == -1) return (state == BlockIsRemember || state == BlockIsMarker); return state == select; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,406
void IRCView::replaceDecoration(QString& line, char decoration, char replacement) { int pos; bool decorated = false; while((pos=line.indexOf(decoration))!=-1) { line.replace(pos,1,(decorated) ? QString("</%1>").arg(replacement) : QString("<%1>").arg(replacement)); decorated = !decorated...
DoS
0
void IRCView::replaceDecoration(QString& line, char decoration, char replacement) { int pos; bool decorated = false; while((pos=line.indexOf(decoration))!=-1) { line.replace(pos,1,(decorated) ? QString("</%1>").arg(replacement) : QString("<%1>").arg(replacement)); decorated = !decorated...
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,407
bool IRCView::search(const QString& pattern, bool caseSensitive, bool wholeWords, bool forward, bool fromCursor) { if (pattern.isEmpty()) return true; m_pattern = pattern; m_forward = forward; m_searchFlags = 0; if (caseSensitive) m_searchFlags |= QTextDocument::FindCase...
DoS
0
bool IRCView::search(const QString& pattern, bool caseSensitive, bool wholeWords, bool forward, bool fromCursor) { if (pattern.isEmpty()) return true; m_pattern = pattern; m_forward = forward; m_searchFlags = 0; if (caseSensitive) m_searchFlags |= QTextDocument::FindCase...
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,408
void IRCView::setChatWin(ChatWindow* chatWin) { m_chatWin = chatWin; }
DoS
0
void IRCView::setChatWin(ChatWindow* chatWin) { m_chatWin = chatWin; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,409
void IRCView::setServer(Server* newServer) { if (m_server == newServer) return; m_server = newServer; }
DoS
0
void IRCView::setServer(Server* newServer) { if (m_server == newServer) return; m_server = newServer; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,410
QString IRCView::timeStamp() { if(Preferences::self()->timestamping()) { QTime time = QTime::currentTime(); QString timeColor = Preferences::self()->color(Preferences::Time).name(); QString timeFormat = Preferences::self()->timestampFormat(); QString timeString; if(!Pref...
DoS
0
QString IRCView::timeStamp() { if(Preferences::self()->timestamping()) { QTime time = QTime::currentTime(); QString timeColor = Preferences::self()->color(Preferences::Time).name(); QString timeFormat = Preferences::self()->timestampFormat(); QString timeString; if(!Pref...
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,411
void unlink() { if (m_prev) m_prev->m_next = m_next; if (m_next) m_next->m_prev = m_prev; }
DoS
0
void unlink() { if (m_prev) m_prev->m_next = m_next; if (m_next) m_next->m_prev = m_prev; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,412
void IRCView::voidLineBlock(QTextBlock rem) { QTextCursor c(rem); c.select(QTextCursor::BlockUnderCursor); c.removeSelectedText(); }
DoS
0
void IRCView::voidLineBlock(QTextBlock rem) { QTextCursor c(rem); c.select(QTextCursor::BlockUnderCursor); c.removeSelectedText(); }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,413
void IRCView::wipeLineParagraphs() { m_rememberLine = m_lastMarkerLine = 0; }
DoS
0
void IRCView::wipeLineParagraphs() { m_rememberLine = m_lastMarkerLine = 0; }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,414
IRCView::~IRCView() { }
DoS
0
IRCView::~IRCView() { }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,415
~ScrollBarPin() { if (m_bar) m_bar->setValue(m_bar->maximum()); }
DoS
0
~ScrollBarPin() { if (m_bar) m_bar->setValue(m_bar->maximum()); }
@@ -1633,7 +1633,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag) } // reopen relevant tags - ret += openTags(data, i); + if (i > -1) + ret += openTags(data, i); return ret; } @@ -1641,7 +1642,8 @@ QString IRCView::closeToTagString(TextHtmlData* data, cons...
null
null
null
1,416
void FAST_FUNC dealloc_bunzip(bunzip_data *bd) { free(bd->dbuf); free(bd); }
Overflow
0
void FAST_FUNC dealloc_bunzip(bunzip_data *bd) { free(bd->dbuf); free(bd); }
@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted) static int get_next_block(bunzip_data *bd) { struct group_data *hufGroup; - int dbufCount, dbufSize, groupCount, *base, *limit, selector, - i, j, runPos, symCount, symTotal, nSelectors, byteCount[256]; - int runCnt = runCnt; /* for co...
CWE-190
null
null
1,417
static unsigned get_bits(bunzip_data *bd, int bits_wanted) { unsigned bits = 0; /* Cache bd->inbufBitCount in a CPU register (hopefully): */ int bit_count = bd->inbufBitCount; /* If we need to get more data from the byte buffer, do so. (Loop getting one byte at a time to enforce endianness and avoid unaligned...
Overflow
0
static unsigned get_bits(bunzip_data *bd, int bits_wanted) { unsigned bits = 0; /* Cache bd->inbufBitCount in a CPU register (hopefully): */ int bit_count = bd->inbufBitCount; /* If we need to get more data from the byte buffer, do so. (Loop getting one byte at a time to enforce endianness and avoid unaligned...
@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted) static int get_next_block(bunzip_data *bd) { struct group_data *hufGroup; - int dbufCount, dbufSize, groupCount, *base, *limit, selector, - i, j, runPos, symCount, symTotal, nSelectors, byteCount[256]; - int runCnt = runCnt; /* for co...
CWE-190
null
null
1,418
int main(int argc, char **argv) { char c; int i = unpack_bz2_stream(0, 1); if (i < 0) fprintf(stderr, "%s\n", bunzip_errors[-i]); else if (read(STDIN_FILENO, &c, 1)) fprintf(stderr, "Trailing garbage ignored\n"); return -i; }
Overflow
0
int main(int argc, char **argv) { char c; int i = unpack_bz2_stream(0, 1); if (i < 0) fprintf(stderr, "%s\n", bunzip_errors[-i]); else if (read(STDIN_FILENO, &c, 1)) fprintf(stderr, "Trailing garbage ignored\n"); return -i; }
@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted) static int get_next_block(bunzip_data *bd) { struct group_data *hufGroup; - int dbufCount, dbufSize, groupCount, *base, *limit, selector, - i, j, runPos, symCount, symTotal, nSelectors, byteCount[256]; - int runCnt = runCnt; /* for co...
CWE-190
null
null
1,419
int FAST_FUNC start_bunzip(bunzip_data **bdp, int in_fd, const void *inbuf, int len) { bunzip_data *bd; unsigned i; enum { BZh0 = ('B' << 24) + ('Z' << 16) + ('h' << 8) + '0', h0 = ('h' << 8) + '0', }; /* Figure out how much data to allocate */ i = sizeof(bunzip_data); if (in_fd != -1) i += IOBUF_SIZE; ...
Overflow
0
int FAST_FUNC start_bunzip(bunzip_data **bdp, int in_fd, const void *inbuf, int len) { bunzip_data *bd; unsigned i; enum { BZh0 = ('B' << 24) + ('Z' << 16) + ('h' << 8) + '0', h0 = ('h' << 8) + '0', }; /* Figure out how much data to allocate */ i = sizeof(bunzip_data); if (in_fd != -1) i += IOBUF_SIZE; ...
@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted) static int get_next_block(bunzip_data *bd) { struct group_data *hufGroup; - int dbufCount, dbufSize, groupCount, *base, *limit, selector, - i, j, runPos, symCount, symTotal, nSelectors, byteCount[256]; - int runCnt = runCnt; /* for co...
CWE-190
null
null
1,420
BufCompressedClose (BufFilePtr f, int doClose) { CompressedFile *file; BufFilePtr raw; file = (CompressedFile *) f->private; raw = file->file; free (file); BufFileClose (raw, doClose); return 1; }
Exec Code Overflow
0
BufCompressedClose (BufFilePtr f, int doClose) { CompressedFile *file; BufFilePtr raw; file = (CompressedFile *) f->private; raw = file->file; free (file); BufFileClose (raw, doClose); return 1; }
@@ -259,6 +259,8 @@ BufCompressedFill (BufFilePtr f) */ while ( code >= 256 ) { + if (stackp - de_stack >= STACK_SIZE - 1) + return BUFFILEEOF; *stackp++ = file->tab_suffix[code]; code = file->tab_prefix[code]; }
CWE-119
null
null
1,421
BufCompressedSkip (BufFilePtr f, int bytes) { int c; while (bytes--) { c = BufFileGet(f); if (c == BUFFILEEOF) return BUFFILEEOF; } return 0; }
Exec Code Overflow
0
BufCompressedSkip (BufFilePtr f, int bytes) { int c; while (bytes--) { c = BufFileGet(f); if (c == BUFFILEEOF) return BUFFILEEOF; } return 0; }
@@ -259,6 +259,8 @@ BufCompressedFill (BufFilePtr f) */ while ( code >= 256 ) { + if (stackp - de_stack >= STACK_SIZE - 1) + return BUFFILEEOF; *stackp++ = file->tab_suffix[code]; code = file->tab_prefix[code]; }
CWE-119
null
null
1,422
BufFilePushCompressed (BufFilePtr f) { int code; int maxbits; int hsize; CompressedFile *file; int extra; if ((BufFileGet(f) != (magic_header[0] & 0xFF)) || (BufFileGet(f) != (magic_header[1] & 0xFF))) { return 0; } code = BufFileGet (f); if (code == BUFFI...
Exec Code Overflow
0
BufFilePushCompressed (BufFilePtr f) { int code; int maxbits; int hsize; CompressedFile *file; int extra; if ((BufFileGet(f) != (magic_header[0] & 0xFF)) || (BufFileGet(f) != (magic_header[1] & 0xFF))) { return 0; } code = BufFileGet (f); if (code == BUFFI...
@@ -259,6 +259,8 @@ BufCompressedFill (BufFilePtr f) */ while ( code >= 256 ) { + if (stackp - de_stack >= STACK_SIZE - 1) + return BUFFILEEOF; *stackp++ = file->tab_suffix[code]; code = file->tab_prefix[code]; }
CWE-119
null
null
1,423
getcode(CompressedFile *file) { register code_int code; register int r_off, bits; register char_type *bp = file->buf; register BufFilePtr raw; if ( file->clear_flg > 0 || file->offset >= file->size || file->free_ent > file->maxcode ) { /* * If the next entry will be too big for the current ...
Exec Code Overflow
0
getcode(CompressedFile *file) { register code_int code; register int r_off, bits; register char_type *bp = file->buf; register BufFilePtr raw; if ( file->clear_flg > 0 || file->offset >= file->size || file->free_ent > file->maxcode ) { /* * If the next entry will be too big for the current ...
@@ -259,6 +259,8 @@ BufCompressedFill (BufFilePtr f) */ while ( code >= 256 ) { + if (stackp - de_stack >= STACK_SIZE - 1) + return BUFFILEEOF; *stackp++ = file->tab_suffix[code]; code = file->tab_prefix[code]; }
CWE-119
null
null
1,424
main (int argc, char *argv[]) { BufFilePtr inputraw, input, output; int c; inputraw = BufFileOpenRead (0); input = BufFilePushCompressed (inputraw); output = BufFileOpenWrite (1); while ((c = BufFileGet (input)) != BUFFILEEOF) BufFilePut (c, output); BufFileClose (input, FALSE...
Exec Code Overflow
0
main (int argc, char *argv[]) { BufFilePtr inputraw, input, output; int c; inputraw = BufFileOpenRead (0); input = BufFilePushCompressed (inputraw); output = BufFileOpenWrite (1); while ((c = BufFileGet (input)) != BUFFILEEOF) BufFilePut (c, output); BufFileClose (input, FALSE...
@@ -259,6 +259,8 @@ BufCompressedFill (BufFilePtr f) */ while ( code >= 256 ) { + if (stackp - de_stack >= STACK_SIZE - 1) + return BUFFILEEOF; *stackp++ = file->tab_suffix[code]; code = file->tab_prefix[code]; }
CWE-119
null
null
1,425
int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, int flags) { int cnt = 0, i, j; *canon = 0; if (name) { /* reject empty name and check len so it fits into temp bufs */ size_t l = strnlen(name, 255); if (l-1 >= 254) return EAI_NONAME; memcpy(can...
Overflow
0
int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, int flags) { int cnt = 0, i, j; *canon = 0; if (name) { /* reject empty name and check len so it fits into temp bufs */ size_t l = strnlen(name, 255); if (l-1 >= 254) return EAI_NONAME; memcpy(can...
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,426
static int addrcmp(const void *_a, const void *_b) { const struct address *a = _a, *b = _b; return b->sortkey - a->sortkey; }
Overflow
0
static int addrcmp(const void *_a, const void *_b) { const struct address *a = _a, *b = _b; return b->sortkey - a->sortkey; }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,427
static int is_valid_hostname(const char *host) { const unsigned char *s; if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; for (s=(void *)host; *s>=0x80 || *s=='.' || *s=='-' || isalnum(*s); s++); return !*s; }
Overflow
0
static int is_valid_hostname(const char *host) { const unsigned char *s; if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; for (s=(void *)host; *s>=0x80 || *s=='.' || *s=='-' || isalnum(*s); s++); return !*s; }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,428
static int labelof(const struct in6_addr *a) { return policyof(a)->label; }
Overflow
0
static int labelof(const struct in6_addr *a) { return policyof(a)->label; }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,429
static int name_from_dns(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, const struct resolvconf *conf) { unsigned char qbuf[2][280], abuf[2][512]; const unsigned char *qp[2] = { qbuf[0], qbuf[1] }; unsigned char *ap[2] = { abuf[0], abuf[1] }; int qlens[2], alens[2]; int ...
Overflow
0
static int name_from_dns(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, const struct resolvconf *conf) { unsigned char qbuf[2][280], abuf[2][512]; const unsigned char *qp[2] = { qbuf[0], qbuf[1] }; unsigned char *ap[2] = { abuf[0], abuf[1] }; int qlens[2], alens[2]; int ...
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,430
static int name_from_dns_search(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family) { char search[256]; struct resolvconf conf; size_t l, dots; char *p, *z; if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; /* Count dots, suppress search when >=ndots or n...
Overflow
0
static int name_from_dns_search(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family) { char search[256]; struct resolvconf conf; size_t l, dots; char *p, *z; if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; /* Count dots, suppress search when >=ndots or n...
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,431
static int name_from_null(struct address buf[static 2], const char *name, int family, int flags) { int cnt = 0; if (name) return 0; if (flags & AI_PASSIVE) { if (family != AF_INET6) buf[cnt++] = (struct address){ .family = AF_INET }; if (family != AF_INET) buf[cnt++] = (struct address){ .family = AF_INET6 ...
Overflow
0
static int name_from_null(struct address buf[static 2], const char *name, int family, int flags) { int cnt = 0; if (name) return 0; if (flags & AI_PASSIVE) { if (family != AF_INET6) buf[cnt++] = (struct address){ .family = AF_INET }; if (family != AF_INET) buf[cnt++] = (struct address){ .family = AF_INET6 ...
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,432
static int name_from_numeric(struct address buf[static 1], const char *name, int family) { return __lookup_ipliteral(buf, name, family); }
Overflow
0
static int name_from_numeric(struct address buf[static 1], const char *name, int family) { return __lookup_ipliteral(buf, name, family); }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,433
static const struct policy *policyof(const struct in6_addr *a) { int i; for (i=0; ; i++) { if (memcmp(a->s6_addr, defpolicy[i].addr, defpolicy[i].len)) continue; if ((a->s6_addr[defpolicy[i].len] & defpolicy[i].mask) != defpolicy[i].addr[defpolicy[i].len]) continue; return defpolicy+i; } }
Overflow
0
static const struct policy *policyof(const struct in6_addr *a) { int i; for (i=0; ; i++) { if (memcmp(a->s6_addr, defpolicy[i].addr, defpolicy[i].len)) continue; if ((a->s6_addr[defpolicy[i].len] & defpolicy[i].mask) != defpolicy[i].addr[defpolicy[i].len]) continue; return defpolicy+i; } }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,434
static int prefixmatch(const struct in6_addr *s, const struct in6_addr *d) { /* FIXME: The common prefix length should be limited to no greater * than the nominal length of the prefix portion of the source * address. However the definition of the source prefix length is * not clear and thus this limiting is not ...
Overflow
0
static int prefixmatch(const struct in6_addr *s, const struct in6_addr *d) { /* FIXME: The common prefix length should be limited to no greater * than the nominal length of the prefix portion of the source * address. However the definition of the source prefix length is * not clear and thus this limiting is not ...
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,435
static int scopeof(const struct in6_addr *a) { if (IN6_IS_ADDR_MULTICAST(a)) return a->s6_addr[1] & 15; if (IN6_IS_ADDR_LINKLOCAL(a)) return 2; if (IN6_IS_ADDR_LOOPBACK(a)) return 2; if (IN6_IS_ADDR_SITELOCAL(a)) return 5; return 14; }
Overflow
0
static int scopeof(const struct in6_addr *a) { if (IN6_IS_ADDR_MULTICAST(a)) return a->s6_addr[1] & 15; if (IN6_IS_ADDR_LINKLOCAL(a)) return 2; if (IN6_IS_ADDR_LOOPBACK(a)) return 2; if (IN6_IS_ADDR_SITELOCAL(a)) return 5; return 14; }
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const { char tmp[256]; struct dpc_ctx *ctx = c; + if (ctx->cnt >= MAXADDRS) return -1; switch (rr) { case RR_A: if (len != 4) return -1;
CWE-119
null
null
1,436
main (int argc, char *argv[]) { Object info; GBool ok; int exitCode; exitCode = 99; ok = parseArgs (argDesc, &argc, argv); if (!ok || argc != 3 || printVersion || printHelp) { fprintf (stderr, "pdfseparate version %s\n", PACKAGE_VERSION); fprintf (stderr, "%s\n", popplerCopyright); f...
DoS Exec Code Overflow
0
main (int argc, char *argv[]) { Object info; GBool ok; int exitCode; exitCode = 99; ok = parseArgs (argDesc, &argc, argv); if (!ok || argc != 3 || printVersion || printHelp) { fprintf (stderr, "pdfseparate version %s\n", PACKAGE_VERSION); fprintf (stderr, "%s\n", popplerCopyright); f...
@@ -44,7 +44,7 @@ static const ArgDesc argDesc[] = { }; bool extractPages (const char *srcFileName, const char *destFileName) { - char pathName[1024]; + char pathName[4096]; GooString *gfileName = new GooString (srcFileName); PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL); @@ -66,7 +66,7 @@ bool e...
CWE-119
null
null
1,437
static int jffs2_acl_count(size_t size) { size_t s; size -= sizeof(struct jffs2_acl_header); s = size - 4 * sizeof(struct jffs2_acl_entry_short); if (s < 0) { if (size % sizeof(struct jffs2_acl_entry_short)) return -1; return size / sizeof(struct jffs2_acl_entry_short); } else { if (s % sizeof(struct jff...
null
0
static int jffs2_acl_count(size_t size) { size_t s; size -= sizeof(struct jffs2_acl_header); s = size - 4 * sizeof(struct jffs2_acl_entry_short); if (s < 0) { if (size % sizeof(struct jffs2_acl_entry_short)) return -1; return size / sizeof(struct jffs2_acl_entry_short); } else { if (s % sizeof(struct jff...
@@ -176,7 +176,7 @@ static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct spin_unlock(&inode->i_lock); } -static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) +struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JF...
CWE-264
null
null
1,438
static struct posix_acl *jffs2_acl_from_medium(void *value, size_t size) { void *end = value + size; struct jffs2_acl_header *header = value; struct jffs2_acl_entry *entry; struct posix_acl *acl; uint32_t ver; int i, count; if (!value) return NULL; if (size < sizeof(struct jffs2_acl_header)) return ERR_PTR...
null
0
static struct posix_acl *jffs2_acl_from_medium(void *value, size_t size) { void *end = value + size; struct jffs2_acl_header *header = value; struct jffs2_acl_entry *entry; struct posix_acl *acl; uint32_t ver; int i, count; if (!value) return NULL; if (size < sizeof(struct jffs2_acl_header)) return ERR_PTR...
@@ -176,7 +176,7 @@ static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct spin_unlock(&inode->i_lock); } -static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) +struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JF...
CWE-264
null
null
1,439
static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) { struct jffs2_acl_header *header; struct jffs2_acl_entry *entry; void *e; size_t i; *size = jffs2_acl_size(acl->a_count); header = kmalloc(sizeof(*header) + acl->a_count * sizeof(*entry), GFP_KERNEL); if (!header) return ERR_PTR(-ENO...
null
0
static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) { struct jffs2_acl_header *header; struct jffs2_acl_entry *entry; void *e; size_t i; *size = jffs2_acl_size(acl->a_count); header = kmalloc(sizeof(*header) + acl->a_count * sizeof(*entry), GFP_KERNEL); if (!header) return ERR_PTR(-ENO...
@@ -176,7 +176,7 @@ static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct spin_unlock(&inode->i_lock); } -static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) +struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JF...
CWE-264
null
null
1,440
static struct posix_acl *jffs2_iget_acl(struct inode *inode, struct posix_acl **i_acl) { struct posix_acl *acl = JFFS2_ACL_NOT_CACHED; spin_lock(&inode->i_lock); if (*i_acl != JFFS2_ACL_NOT_CACHED) acl = posix_acl_dup(*i_acl); spin_unlock(&inode->i_lock); return acl; }
null
0
static struct posix_acl *jffs2_iget_acl(struct inode *inode, struct posix_acl **i_acl) { struct posix_acl *acl = JFFS2_ACL_NOT_CACHED; spin_lock(&inode->i_lock); if (*i_acl != JFFS2_ACL_NOT_CACHED) acl = posix_acl_dup(*i_acl); spin_unlock(&inode->i_lock); return acl; }
@@ -176,7 +176,7 @@ static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct spin_unlock(&inode->i_lock); } -static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) +struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JF...
CWE-264
null
null
1,441
static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target, struct nameidata *nd) { struct jffs2_inode_info *dir_f; struct jffs2_sb_info *c; struct jffs2_full_dirent *fd = NULL, *fd_list; uint32_t ino = 0; struct inode *inode = NULL; D1(printk(KERN_DEBUG "jffs2_lookup()\n")); if (targ...
null
0
static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target, struct nameidata *nd) { struct jffs2_inode_info *dir_f; struct jffs2_sb_info *c; struct jffs2_full_dirent *fd = NULL, *fd_list; uint32_t ino = 0; struct inode *inode = NULL; D1(printk(KERN_DEBUG "jffs2_lookup()\n")); if (targ...
@@ -182,6 +182,7 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, struct jffs2_inode_info *f, *dir_f; struct jffs2_sb_info *c; struct inode *inode; + struct posix_acl *acl; int ret; ri = jffs2_alloc_raw_inode(); @@ -192,7 +193,7 @@ static i...
CWE-264
null
null
1,442
static int jffs2_readdir(struct file *filp, void *dirent, filldir_t filldir) { struct jffs2_inode_info *f; struct jffs2_sb_info *c; struct inode *inode = filp->f_path.dentry->d_inode; struct jffs2_full_dirent *fd; unsigned long offset, curofs; D1(printk(KERN_DEBUG "jffs2_readdir() for dir_i #%lu\n", filp->f_path...
null
0
static int jffs2_readdir(struct file *filp, void *dirent, filldir_t filldir) { struct jffs2_inode_info *f; struct jffs2_sb_info *c; struct inode *inode = filp->f_path.dentry->d_inode; struct jffs2_full_dirent *fd; unsigned long offset, curofs; D1(printk(KERN_DEBUG "jffs2_readdir() for dir_i #%lu\n", filp->f_path...
@@ -182,6 +182,7 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, struct jffs2_inode_info *f, *dir_f; struct jffs2_sb_info *c; struct inode *inode; + struct posix_acl *acl; int ret; ri = jffs2_alloc_raw_inode(); @@ -192,7 +193,7 @@ static i...
CWE-264
null
null
1,443
int server_open_native_socket(Server*s) { union sockaddr_union sa; int one, r; struct epoll_event ev; assert(s); if (s->native_fd < 0) { s->native_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); if (s->native_fd < 0) { ...
DoS Exec Code Overflow
0
int server_open_native_socket(Server*s) { union sockaddr_union sa; int one, r; struct epoll_event ev; assert(s); if (s->native_fd < 0) { s->native_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); if (s->native_fd < 0) { ...
@@ -30,7 +30,8 @@ #include "journald-console.h" #include "journald-syslog.h" -#define ENTRY_SIZE_MAX (1024*1024*32) +#define ENTRY_SIZE_MAX (1024*1024*64) +#define DATA_SIZE_MAX (1024*1024*64) static bool valid_user_field(const char *p, size_t l) { const char *a; @@ -205,7 +206,12 @@ void server_process...
CWE-189
null
null
1,444
void server_process_native_file( Server *s, int fd, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len) { struct stat st; void *p; ssize_t n; assert(s); assert(fd >= 0); ...
DoS Exec Code Overflow
0
void server_process_native_file( Server *s, int fd, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len) { struct stat st; void *p; ssize_t n; assert(s); assert(fd >= 0); ...
@@ -30,7 +30,8 @@ #include "journald-console.h" #include "journald-syslog.h" -#define ENTRY_SIZE_MAX (1024*1024*32) +#define ENTRY_SIZE_MAX (1024*1024*64) +#define DATA_SIZE_MAX (1024*1024*64) static bool valid_user_field(const char *p, size_t l) { const char *a; @@ -205,7 +206,12 @@ void server_process...
CWE-189
null
null
1,445
static bool valid_user_field(const char *p, size_t l) { const char *a; /* We kinda enforce POSIX syntax recommendations for environment variables here, but make a couple of additional requirements. http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.htm...
DoS Exec Code Overflow
0
static bool valid_user_field(const char *p, size_t l) { const char *a; /* We kinda enforce POSIX syntax recommendations for environment variables here, but make a couple of additional requirements. http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.htm...
@@ -30,7 +30,8 @@ #include "journald-console.h" #include "journald-syslog.h" -#define ENTRY_SIZE_MAX (1024*1024*32) +#define ENTRY_SIZE_MAX (1024*1024*64) +#define DATA_SIZE_MAX (1024*1024*64) static bool valid_user_field(const char *p, size_t l) { const char *a; @@ -205,7 +206,12 @@ void server_process...
CWE-189
null
null
1,446
copy_resource(fz_context *ctx, pdf_filter_processor *p, pdf_obj *key, const char *name) { pdf_obj *res, *obj; if (!name || name[0] == 0) return; res = pdf_dict_get(ctx, p->old_rdb, key); obj = pdf_dict_gets(ctx, res, name); if (obj) { res = pdf_dict_get(ctx, p->new_rdb, key); if (!res) { res = pdf_ne...
null
0
copy_resource(fz_context *ctx, pdf_filter_processor *p, pdf_obj *key, const char *name) { pdf_obj *res, *obj; if (!name || name[0] == 0) return; res = pdf_dict_get(ctx, p->old_rdb, key); obj = pdf_dict_gets(ctx, res, name); if (obj) { res = pdf_dict_get(ctx, p->new_rdb, key); if (!res) { res = pdf_ne...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,447
static void filter_flush(fz_context *ctx, pdf_filter_processor *p, int flush) { filter_gstate *gstate = gstate_to_update(ctx, p); int i; if (gstate->pushed == 0) { gstate->pushed = 1; if (p->chain->op_q) p->chain->op_q(ctx, p->chain); } if (flush) flush_tags(ctx, p, &p->pending_tags); if (flush & FLU...
null
0
static void filter_flush(fz_context *ctx, pdf_filter_processor *p, int flush) { filter_gstate *gstate = gstate_to_update(ctx, p); int i; if (gstate->pushed == 0) { gstate->pushed = 1; if (p->chain->op_q) p->chain->op_q(ctx, p->chain); } if (flush) flush_tags(ctx, p, &p->pending_tags); if (flush & FLU...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,448
filter_pop(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; filter_gstate *old = gstate->next; /* We are at the top, so nothing to pop! */ if (old == NULL) return 1; if (gstate->pushed) if (p->chain->op_Q) p->chain->op_Q(ctx, p->chain); pdf_drop_font(ctx, gstate->pending.te...
null
0
filter_pop(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; filter_gstate *old = gstate->next; /* We are at the top, so nothing to pop! */ if (old == NULL) return 1; if (gstate->pushed) if (p->chain->op_Q) p->chain->op_Q(ctx, p->chain); pdf_drop_font(ctx, gstate->pending.te...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,449
filter_push(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; filter_gstate *new_gstate = fz_malloc_struct(ctx, filter_gstate); *new_gstate = *gstate; new_gstate->pushed = 0; new_gstate->next = gstate; p->gstate = new_gstate; pdf_keep_font(ctx, new_gstate->pending.text.font); pdf_k...
null
0
filter_push(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; filter_gstate *new_gstate = fz_malloc_struct(ctx, filter_gstate); *new_gstate = *gstate; new_gstate->pushed = 0; new_gstate->next = gstate; p->gstate = new_gstate; pdf_keep_font(ctx, new_gstate->pending.text.font); pdf_k...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,450
filter_show_char(fz_context *ctx, pdf_filter_processor *p, int cid, int *unicode) { filter_gstate *gstate = p->gstate; pdf_font_desc *fontdesc = gstate->pending.text.font; fz_matrix trm; int ucsbuf[8]; int ucslen; int remove = 0; (void)pdf_tos_make_trm(ctx, &p->tos, &gstate->pending.text, fontdesc, cid, &trm); ...
null
0
filter_show_char(fz_context *ctx, pdf_filter_processor *p, int cid, int *unicode) { filter_gstate *gstate = p->gstate; pdf_font_desc *fontdesc = gstate->pending.text.font; fz_matrix trm; int ucsbuf[8]; int ucslen; int remove = 0; (void)pdf_tos_make_trm(ctx, &p->tos, &gstate->pending.text, fontdesc, cid, &trm); ...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,451
filter_show_space(fz_context *ctx, pdf_filter_processor *p, float tadj) { filter_gstate *gstate = p->gstate; pdf_font_desc *fontdesc = gstate->pending.text.font; if (fontdesc->wmode == 0) p->tos.tm = fz_pre_translate(p->tos.tm, tadj * gstate->pending.text.scale, 0); else p->tos.tm = fz_pre_translate(p->tos.tm,...
null
0
filter_show_space(fz_context *ctx, pdf_filter_processor *p, float tadj) { filter_gstate *gstate = p->gstate; pdf_font_desc *fontdesc = gstate->pending.text.font; if (fontdesc->wmode == 0) p->tos.tm = fz_pre_translate(p->tos.tm, tadj * gstate->pending.text.scale, 0); else p->tos.tm = fz_pre_translate(p->tos.tm,...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,452
static void flush_tags(fz_context *ctx, pdf_filter_processor *p, tag_record **tags) { tag_record *tag = *tags; if (tag == NULL) return; if (tag->prev) flush_tags(ctx, p, &tag->prev); if (tag->bdc) { if (p->chain->op_BDC) p->chain->op_BDC(ctx, p->chain, tag->tag, tag->raw, tag->cooked); } else if (p->ch...
null
0
static void flush_tags(fz_context *ctx, pdf_filter_processor *p, tag_record **tags) { tag_record *tag = *tags; if (tag == NULL) return; if (tag->prev) flush_tags(ctx, p, &tag->prev); if (tag->bdc) { if (p->chain->op_BDC) p->chain->op_BDC(ctx, p->chain, tag->tag, tag->raw, tag->cooked); } else if (p->ch...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,453
gstate_to_update(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; /* If we're not the top, that's fine */ if (gstate->next != NULL) return gstate; /* We are the top. Push a group, so we're not */ filter_push(ctx, p); gstate = p->gstate; gstate->pushed = 1; if (p->chain->op_q) ...
null
0
gstate_to_update(fz_context *ctx, pdf_filter_processor *p) { filter_gstate *gstate = p->gstate; /* If we're not the top, that's fine */ if (gstate->next != NULL) return gstate; /* We are the top. Push a group, so we're not */ filter_push(ctx, p); gstate = p->gstate; gstate->pushed = 1; if (p->chain->op_q) ...
@@ -547,7 +547,7 @@ walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; - if (str->utf8 == NULL) + if (str->utf8 == NULL || str->pos == -1) return; do @@ -608,10 +608,12 @@ mcid_char_imp(fz_context *ctx, pdf_filter_processor *p, tag_record *t...
CWE-125
null
null
1,454
static char *addr_to_string(const char *format, struct sockaddr_storage *sa, socklen_t salen) { char *addr; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; int err; size_t addrlen; if ((err = getnameinfo((struct sockaddr *)sa, salen, ...
DoS Overflow
0
static char *addr_to_string(const char *format, struct sockaddr_storage *sa, socklen_t salen) { char *addr; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; int err; size_t addrlen; if ((err = getnameinfo((struct sockaddr *)sa, salen, ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,455
static void async_read_handler(int fd, int event, void *data) { AsyncRead *obj = (AsyncRead *)data; for (;;) { int n = obj->end - obj->now; spice_assert(n > 0); n = reds_stream_read(obj->stream, obj->now, n); if (n <= 0) { if (n < 0) { switch (errno)...
DoS Overflow
0
static void async_read_handler(int fd, int event, void *data) { AsyncRead *obj = (AsyncRead *)data; for (;;) { int n = obj->end - obj->now; spice_assert(n > 0); n = reds_stream_read(obj->stream, obj->now, n); if (n <= 0) { if (n < 0) { switch (errno)...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,456
static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) { VDIPortState *state = &reds->agent_state; SpiceCharDeviceInterface *sif; SpiceCharDeviceCallbacks char_dev_state_cbs; if (!state->base) { char_dev_state_cbs.read_one_msg_from_device = vdi_port_read_one_msg_from_dev...
DoS Overflow
0
static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) { VDIPortState *state = &reds->agent_state; SpiceCharDeviceInterface *sif; SpiceCharDeviceCallbacks char_dev_state_cbs; if (!state->base) { char_dev_state_cbs.read_one_msg_from_device = vdi_port_read_one_msg_from_dev...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,457
static int auth_sasl_check_ssf(RedsSASL *sasl, int *runSSF) { const void *val; int err, ssf; *runSSF = 0; if (!sasl->wantSSF) { return 1; } err = sasl_getprop(sasl->conn, SASL_SSF, &val); if (err != SASL_OK) { return 0; } ssf = *(const int *)val; spice_info("ne...
DoS Overflow
0
static int auth_sasl_check_ssf(RedsSASL *sasl, int *runSSF) { const void *val; int err, ssf; *runSSF = 0; if (!sasl->wantSSF) { return 1; } err = sasl_getprop(sasl->conn, SASL_SSF, &val); if (err != SASL_OK) { return 0; } ssf = *(const int *)val; spice_info("ne...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,458
static int do_spice_init(SpiceCoreInterface *core_interface) { spice_info("starting %s", version_string); if (core_interface->base.major_version != SPICE_INTERFACE_CORE_MAJOR) { spice_warning("bad core interface version"); goto err; } core = core_interface; reds->listen_socket = -1;...
DoS Overflow
0
static int do_spice_init(SpiceCoreInterface *core_interface) { spice_info("starting %s", version_string); if (core_interface->base.major_version != SPICE_INTERFACE_CORE_MAJOR) { spice_warning("bad core interface version"); goto err; } core = core_interface; reds->listen_socket = -1;...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,459
static void init_vd_agent_resources(void) { VDIPortState *state = &reds->agent_state; int i; ring_init(&state->read_bufs); agent_msg_filter_init(&state->write_filter, agent_copypaste, agent_file_xfer, TRUE); agent_msg_filter_init(&state->read_filter, agent_copypaste, ...
DoS Overflow
0
static void init_vd_agent_resources(void) { VDIPortState *state = &reds->agent_state; int i; ring_init(&state->read_bufs); agent_msg_filter_init(&state->write_filter, agent_copypaste, agent_file_xfer, TRUE); agent_msg_filter_init(&state->read_filter, agent_copypaste, ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,460
static void insert_stat_node(StatNodeRef parent, StatNodeRef ref) { SpiceStatNode *node = &reds->stat->nodes[ref]; uint32_t pos = INVALID_STAT_REF; uint32_t node_index; uint32_t *head; SpiceStatNode *n; node->first_child_index = INVALID_STAT_REF; head = (parent == INVALID_STAT_REF ? &reds->...
DoS Overflow
0
static void insert_stat_node(StatNodeRef parent, StatNodeRef ref) { SpiceStatNode *node = &reds->stat->nodes[ref]; uint32_t pos = INVALID_STAT_REF; uint32_t node_index; uint32_t *head; SpiceStatNode *n; node->first_child_index = INVALID_STAT_REF; head = (parent == INVALID_STAT_REF ? &reds->...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,461
static int load_dh_params(SSL_CTX *ctx, char *file) { DH *ret = 0; BIO *bio; if ((bio = BIO_new_file(file, "r")) == NULL) { spice_warning("Could not open DH file"); return -1; } ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); BIO_free(bio); if (ret == 0) { spice...
DoS Overflow
0
static int load_dh_params(SSL_CTX *ctx, char *file) { DH *ret = 0; BIO *bio; if ((bio = BIO_new_file(file, "r")) == NULL) { spice_warning("Could not open DH file"); return -1; } ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); BIO_free(bio); if (ret == 0) { spice...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,462
static void migrate_timeout(void *opaque) { spice_info(NULL); spice_assert(reds->mig_wait_connect || reds->mig_wait_disconnect); if (reds->mig_wait_connect) { /* we will fall back to the switch host scheme when migration completes */ main_channel_migrate_cancel_wait(reds->main_channel); ...
DoS Overflow
0
static void migrate_timeout(void *opaque) { spice_info(NULL); spice_assert(reds->mig_wait_connect || reds->mig_wait_disconnect); if (reds->mig_wait_connect) { /* we will fall back to the switch host scheme when migration completes */ main_channel_migrate_cancel_wait(reds->main_channel); ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,463
static void mm_timer_proc(void *opaque) { red_dispatcher_set_mm_time(reds_get_mm_time()); core->timer_start(reds->mm_timer, MM_TIMER_GRANULARITY_MS); }
DoS Overflow
0
static void mm_timer_proc(void *opaque) { red_dispatcher_set_mm_time(reds_get_mm_time()); core->timer_start(reds->mm_timer, MM_TIMER_GRANULARITY_MS); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,464
static inline void on_activating_ticketing(void) { if (!ticketing_enabled && reds_main_channel_connected()) { spice_warning("disconnecting"); reds_disconnect(); } }
DoS Overflow
0
static inline void on_activating_ticketing(void) { if (!ticketing_enabled && reds_main_channel_connected()) { spice_warning("disconnecting"); reds_disconnect(); } }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,465
static void openssl_init(RedLinkInfo *link) { unsigned long f4 = RSA_F4; link->tiTicketing.bn = BN_new(); if (!link->tiTicketing.bn) { spice_error("OpenSSL BIGNUMS alloc failed"); } BN_set_word(link->tiTicketing.bn, f4); }
DoS Overflow
0
static void openssl_init(RedLinkInfo *link) { unsigned long f4 = RSA_F4; link->tiTicketing.bn = BN_new(); if (!link->tiTicketing.bn) { spice_error("OpenSSL BIGNUMS alloc failed"); } BN_set_word(link->tiTicketing.bn, f4); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,466
static void openssl_thread_setup(void) { int i; lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); for (i = 0; i < CRYPTO_num_locks(); i++) { lock_count[i] = 0; pthread_mutex_init(&(lock_cs[i]), NULL);...
DoS Overflow
0
static void openssl_thread_setup(void) { int i; lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); for (i = 0; i < CRYPTO_num_locks(); i++) { lock_count[i] = 0; pthread_mutex_init(&(lock_cs[i]), NULL);...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,467
static void pthreads_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); lock_count[type]++; } else { pthread_mutex_unlock(&(lock_cs[type])); } }
DoS Overflow
0
static void pthreads_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); lock_count[type]++; } else { pthread_mutex_unlock(&(lock_cs[type])); } }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,468
static unsigned long pthreads_thread_id(void) { unsigned long ret; ret = (unsigned long)pthread_self(); return (ret); }
DoS Overflow
0
static unsigned long pthreads_thread_id(void) { unsigned long ret; ret = (unsigned long)pthread_self(); return (ret); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,469
static void reds_accept_ssl_connection(int fd, int event, void *data) { RedLinkInfo *link; int socket; if ((socket = accept(reds->secure_listen_socket, NULL, 0)) == -1) { spice_warning("accept failed, %s", strerror(errno)); return; } if (!(link = reds_init_client_ssl_connection(soc...
DoS Overflow
0
static void reds_accept_ssl_connection(int fd, int event, void *data) { RedLinkInfo *link; int socket; if ((socket = accept(reds->secure_listen_socket, NULL, 0)) == -1) { spice_warning("accept failed, %s", strerror(errno)); return; } if (!(link = reds_init_client_ssl_connection(soc...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,470
static int reds_agent_state_restore(SpiceMigrateDataMain *mig_data) { VDIPortState *agent_state = &reds->agent_state; uint32_t chunk_header_remaining; agent_state->vdi_chunk_header = mig_data->agent2client.chunk_header; spice_assert(mig_data->agent2client.chunk_header_size <= sizeof(VDIChunkHeader)); ...
DoS Overflow
0
static int reds_agent_state_restore(SpiceMigrateDataMain *mig_data) { VDIPortState *agent_state = &reds->agent_state; uint32_t chunk_header_remaining; agent_state->vdi_chunk_header = mig_data->agent2client.chunk_header; spice_assert(mig_data->agent2client.chunk_header_size <= sizeof(VDIChunkHeader)); ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,471
static void reds_channel_do_link(RedChannel *channel, RedClient *client, SpiceLinkMess *link_msg, RedsStream *stream) { uint32_t *caps; spice_assert(channel); spice_assert(link_msg); spice_assert(stream); caps = (uint32_t *)((uint8_...
DoS Overflow
0
static void reds_channel_do_link(RedChannel *channel, RedClient *client, SpiceLinkMess *link_msg, RedsStream *stream) { uint32_t *caps; spice_assert(channel); spice_assert(link_msg); spice_assert(stream); caps = (uint32_t *)((uint8_...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,472
static void reds_channel_init_auth_caps(RedLinkInfo *link, RedChannel *channel) { if (sasl_enabled && !link->skip_auth) { red_channel_set_common_cap(channel, SPICE_COMMON_CAP_AUTH_SASL); } else { red_channel_set_common_cap(channel, SPICE_COMMON_CAP_AUTH_SPICE); } red_channel_set_common_c...
DoS Overflow
0
static void reds_channel_init_auth_caps(RedLinkInfo *link, RedChannel *channel) { if (sasl_enabled && !link->skip_auth) { red_channel_set_common_cap(channel, SPICE_COMMON_CAP_AUTH_SASL); } else { red_channel_set_common_cap(channel, SPICE_COMMON_CAP_AUTH_SPICE); } red_channel_set_common_c...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,473
static void reds_char_device_remove_state(SpiceCharDeviceState *st) { RingItem *item; RING_FOREACH(item, &reds->char_devs_states) { SpiceCharDeviceStateItem *st_item; st_item = SPICE_CONTAINEROF(item, SpiceCharDeviceStateItem, link); if (st_item->st == st) { ring_remove(ite...
DoS Overflow
0
static void reds_char_device_remove_state(SpiceCharDeviceState *st) { RingItem *item; RING_FOREACH(item, &reds->char_devs_states) { SpiceCharDeviceStateItem *st_item; st_item = SPICE_CONTAINEROF(item, SpiceCharDeviceStateItem, link); if (st_item->st == st) { ring_remove(ite...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,474
void reds_client_disconnect(RedClient *client) { RedsMigTargetClient *mig_client; if (exit_on_disconnect) { spice_info("Exiting server because of client disconnect.\n"); exit(0); } if (!client || client->disconnecting) { spice_debug("client %p already during disconnection",...
DoS Overflow
0
void reds_client_disconnect(RedClient *client) { RedsMigTargetClient *mig_client; if (exit_on_disconnect) { spice_info("Exiting server because of client disconnect.\n"); exit(0); } if (!client || client->disconnecting) { spice_debug("client %p already during disconnection",...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,475
static void reds_client_monitors_config_cleanup(void) { RedsClientMonitorsConfig *cmc = &reds->client_monitors_config; cmc->buffer_size = cmc->buffer_pos = 0; free(cmc->buffer); cmc->buffer = NULL; cmc->mcc = NULL; }
DoS Overflow
0
static void reds_client_monitors_config_cleanup(void) { RedsClientMonitorsConfig *cmc = &reds->client_monitors_config; cmc->buffer_size = cmc->buffer_pos = 0; free(cmc->buffer); cmc->buffer = NULL; cmc->mcc = NULL; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,476
void reds_disable_mm_timer(void) { core->timer_cancel(reds->mm_timer); reds->mm_timer_enabled = FALSE; }
DoS Overflow
0
void reds_disable_mm_timer(void) { core->timer_cancel(reds->mm_timer); reds->mm_timer_enabled = FALSE; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,477
static void reds_disconnect(void) { RingItem *link, *next; spice_info(NULL); RING_FOREACH_SAFE(link, next, &reds->clients) { reds_client_disconnect(SPICE_CONTAINEROF(link, RedClient, link)); } reds_mig_cleanup(); }
DoS Overflow
0
static void reds_disconnect(void) { RingItem *link, *next; spice_info(NULL); RING_FOREACH_SAFE(link, next, &reds->clients) { reds_client_disconnect(SPICE_CONTAINEROF(link, RedClient, link)); } reds_mig_cleanup(); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,478
static void reds_exit(void) { if (reds->main_channel) { main_channel_close(reds->main_channel); } #ifdef RED_STATISTICS shm_unlink(reds->stat_shm_name); free(reds->stat_shm_name); #endif }
DoS Overflow
0
static void reds_exit(void) { if (reds->main_channel) { main_channel_close(reds->main_channel); } #ifdef RED_STATISTICS shm_unlink(reds->stat_shm_name); free(reds->stat_shm_name); #endif }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,479
int reds_expects_link_id(uint32_t connection_id) { spice_info("TODO: keep a list of connection_id's from migration, compare to them"); return 1; }
DoS Overflow
0
int reds_expects_link_id(uint32_t connection_id) { spice_info("TODO: keep a list of connection_id's from migration, compare to them"); return 1; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,480
void reds_fill_channels(SpiceMsgChannels *channels_info) { RingItem *now; int used_channels = 0; channels_info->num_of_channels = reds->num_of_channels; RING_FOREACH(now, &reds->channels) { RedChannel *channel = SPICE_CONTAINEROF(now, RedChannel, link); if (reds->num_clients > 1 && !cha...
DoS Overflow
0
void reds_fill_channels(SpiceMsgChannels *channels_info) { RingItem *now; int used_channels = 0; channels_info->num_of_channels = reds->num_of_channels; RING_FOREACH(now, &reds->channels) { RedChannel *channel = SPICE_CONTAINEROF(now, RedChannel, link); if (reds->num_clients > 1 && !cha...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,481
static RedChannel *reds_find_channel(uint32_t type, uint32_t id) { RingItem *now; RING_FOREACH(now, &reds->channels) { RedChannel *channel = SPICE_CONTAINEROF(now, RedChannel, link); if (channel->type == type && channel->id == id) { return channel; } } return NULL; }...
DoS Overflow
0
static RedChannel *reds_find_channel(uint32_t type, uint32_t id) { RingItem *now; RING_FOREACH(now, &reds->channels) { RedChannel *channel = SPICE_CONTAINEROF(now, RedChannel, link); if (channel->type == type && channel->id == id) { return channel; } } return NULL; }...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,482
static int reds_find_client(RedClient *client) { RingItem *item; RING_FOREACH(item, &reds->clients) { RedClient *list_client; list_client = SPICE_CONTAINEROF(item, RedClient, link); if (list_client == client) { return TRUE; } } return FALSE; }
DoS Overflow
0
static int reds_find_client(RedClient *client) { RingItem *item; RING_FOREACH(item, &reds->clients) { RedClient *list_client; list_client = SPICE_CONTAINEROF(item, RedClient, link); if (list_client == client) { return TRUE; } } return FALSE; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,483
uint8_t *reds_get_agent_data_buffer(MainChannelClient *mcc, size_t size) { VDIPortState *dev_state = &reds->agent_state; RedClient *client; if (!dev_state->client_agent_started) { /* * agent got disconnected, and possibly got reconnected, but we still can receive * msgs that are a...
DoS Overflow
0
uint8_t *reds_get_agent_data_buffer(MainChannelClient *mcc, size_t size) { VDIPortState *dev_state = &reds->agent_state; RedClient *client; if (!dev_state->client_agent_started) { /* * agent got disconnected, and possibly got reconnected, but we still can receive * msgs that are a...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,484
int reds_get_agent_mouse(void) { return agent_mouse; }
DoS Overflow
0
int reds_get_agent_mouse(void) { return agent_mouse; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,485
static RedClient *reds_get_client(void) { spice_assert(reds->num_clients <= 1); if (reds->num_clients == 0) { return NULL; } return SPICE_CONTAINEROF(ring_get_head(&reds->clients), RedClient, link); }
DoS Overflow
0
static RedClient *reds_get_client(void) { spice_assert(reds->num_clients <= 1); if (reds->num_clients == 0) { return NULL; } return SPICE_CONTAINEROF(ring_get_head(&reds->clients), RedClient, link); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,486
uint32_t reds_get_mm_time(void) { struct timespec time_space; clock_gettime(CLOCK_MONOTONIC, &time_space); return time_space.tv_sec * 1000 + time_space.tv_nsec / 1000 / 1000; }
DoS Overflow
0
uint32_t reds_get_mm_time(void) { struct timespec time_space; clock_gettime(CLOCK_MONOTONIC, &time_space); return time_space.tv_sec * 1000 + time_space.tv_nsec / 1000 / 1000; }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,487
static void reds_get_spice_ticket(RedLinkInfo *link) { AsyncRead *obj = &link->async_read; obj->now = (uint8_t *)&link->tiTicketing.encrypted_ticket.encrypted_data; obj->end = obj->now + link->tiTicketing.rsa_size; obj->done = reds_handle_ticket; async_read_handler(0, 0, &link->async_read); }
DoS Overflow
0
static void reds_get_spice_ticket(RedLinkInfo *link) { AsyncRead *obj = &link->async_read; obj->now = (uint8_t *)&link->tiTicketing.encrypted_ticket.encrypted_data; obj->end = obj->now + link->tiTicketing.rsa_size; obj->done = reds_handle_ticket; async_read_handler(0, 0, &link->async_read); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,488
static void reds_handle_auth_mechanism(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; spice_info("Auth method: %d", link->auth_mechanism.auth_mechanism); if (link->auth_mechanism.auth_mechanism == SPICE_COMMON_CAP_AUTH_SPICE && !sasl_enabled ) { reds_get_spice_ticket(li...
DoS Overflow
0
static void reds_handle_auth_mechanism(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; spice_info("Auth method: %d", link->auth_mechanism.auth_mechanism); if (link->auth_mechanism.auth_mechanism == SPICE_COMMON_CAP_AUTH_SPICE && !sasl_enabled ) { reds_get_spice_ticket(li...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,489
static void reds_handle_auth_mechlen(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; if (sasl->len < 1 || sasl->len > 100) { spice_warning("Got bad client mechname len %d", sasl->len); reds_link_free(li...
DoS Overflow
0
static void reds_handle_auth_mechlen(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; if (sasl->len < 1 || sasl->len > 100) { spice_warning("Got bad client mechname len %d", sasl->len); reds_link_free(li...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,490
static void reds_handle_auth_mechname(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; sasl->mechname[sasl->len] = '\0'; spice_info("Got client mechname '%s' check against '%s'", sasl->mechname, sasl-...
DoS Overflow
0
static void reds_handle_auth_mechname(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; sasl->mechname[sasl->len] = '\0'; spice_info("Got client mechname '%s' check against '%s'", sasl->mechname, sasl-...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,491
static void reds_handle_auth_sasl_start(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; RedsSASL *sasl = &link->stream->sasl; uint32_t datalen = sasl->len; ...
DoS Overflow
0
static void reds_handle_auth_sasl_start(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; RedsSASL *sasl = &link->stream->sasl; uint32_t datalen = sasl->len; ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,492
static void reds_handle_auth_sasl_step(void *opaque) { const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; RedLinkInfo *link = (RedLinkInfo *)opaque; RedsSASL *sasl = &link->stream->sasl; uint32_t datalen = sasl->len; AsyncRead *obj = &link->async_read; ...
DoS Overflow
0
static void reds_handle_auth_sasl_step(void *opaque) { const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; RedLinkInfo *link = (RedLinkInfo *)opaque; RedsSASL *sasl = &link->stream->sasl; uint32_t datalen = sasl->len; AsyncRead *obj = &link->async_read; ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,493
static void reds_handle_auth_sasl_steplen(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; spice_info("Got steplen %d", sasl->len); if (sasl->len > SASL_DATA_MAX_LEN) { spice_warning("Too much SASL data %d",...
DoS Overflow
0
static void reds_handle_auth_sasl_steplen(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; AsyncRead *obj = &link->async_read; RedsSASL *sasl = &link->stream->sasl; spice_info("Got steplen %d", sasl->len); if (sasl->len > SASL_DATA_MAX_LEN) { spice_warning("Too much SASL data %d",...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,494
void reds_handle_channel_event(int event, SpiceChannelEventInfo *info) { if (core->base.minor_version >= 3 && core->channel_event != NULL) core->channel_event(event, info); if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) { free(info); } }
DoS Overflow
0
void reds_handle_channel_event(int event, SpiceChannelEventInfo *info) { if (core->base.minor_version >= 3 && core->channel_event != NULL) core->channel_event(event, info); if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) { free(info); } }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,495
static void reds_handle_link(RedLinkInfo *link) { if (link->link_mess->channel_type == SPICE_CHANNEL_MAIN) { reds_handle_main_link(link); } else { reds_handle_other_links(link); } }
DoS Overflow
0
static void reds_handle_link(RedLinkInfo *link) { if (link->link_mess->channel_type == SPICE_CHANNEL_MAIN) { reds_handle_main_link(link); } else { reds_handle_other_links(link); } }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,496
static void reds_handle_link_error(void *opaque, int err) { RedLinkInfo *link = (RedLinkInfo *)opaque; switch (err) { case 0: case EPIPE: break; default: spice_warning("%s", strerror(errno)); break; } reds_link_free(link); }
DoS Overflow
0
static void reds_handle_link_error(void *opaque, int err) { RedLinkInfo *link = (RedLinkInfo *)opaque; switch (err) { case 0: case EPIPE: break; default: spice_warning("%s", strerror(errno)); break; } reds_link_free(link); }
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,497
static void reds_handle_main_link(RedLinkInfo *link) { RedClient *client; RedsStream *stream; SpiceLinkMess *link_mess; uint32_t *caps; uint32_t connection_id; MainChannelClient *mcc; int mig_target = FALSE; spice_info(NULL); spice_assert(reds->main_channel); link_mess = link->...
DoS Overflow
0
static void reds_handle_main_link(RedLinkInfo *link) { RedClient *client; RedsStream *stream; SpiceLinkMess *link_mess; uint32_t *caps; uint32_t connection_id; MainChannelClient *mcc; int mig_target = FALSE; spice_info(NULL); spice_assert(reds->main_channel); link_mess = link->...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,498
int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_data, uint32_t size) { VDIPortState *agent_state = &reds->agent_state; /* * Now that the client has switched to the target server, if main_channel * controls the mm-time, we update the client's mm-time. * (MSG_MAIN_IN...
DoS Overflow
0
int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_data, uint32_t size) { VDIPortState *agent_state = &reds->agent_state; /* * Now that the client has switched to the target server, if main_channel * controls the mm-time, we update the client's mm-time. * (MSG_MAIN_IN...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null
1,499
static void reds_handle_other_links(RedLinkInfo *link) { RedChannel *channel; RedClient *client = NULL; SpiceLinkMess *link_mess; RedsMigTargetClient *mig_client; link_mess = link->link_mess; if (reds->main_channel) { client = main_channel_get_client_by_link_id(reds->main_channel, ...
DoS Overflow
0
static void reds_handle_other_links(RedLinkInfo *link) { RedChannel *channel; RedClient *client = NULL; SpiceLinkMess *link_mess; RedsMigTargetClient *mig_client; link_mess = link->link_mess; if (reds->main_channel) { client = main_channel_get_client_by_link_id(reds->main_channel, ...
@@ -1926,39 +1926,59 @@ static void reds_handle_link(RedLinkInfo *link) static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; - char password[SPICE_MAX_PASSWORD_LENGTH]; + char *password; time_t ltime; + int password_size; //todo: use monotonic time t...
CWE-119
null
null