Skip to content

Commit

Permalink
insufficient bounds check fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
blackav committed Mar 13, 2018
1 parent 4654f3e commit 1662b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions super_run_status.c
@@ -1,6 +1,6 @@
/* -*- c -*- */

/* Copyright (C) 2015 Alexander Chernov <cher@ejudge.ru> */
/* Copyright (C) 2015-2018 Alexander Chernov <cher@ejudge.ru> */

/*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -51,7 +51,7 @@ super_run_status_add_str(struct super_run_status *psrs, const unsigned char *str
if (!str) return 0;

int len = strlen(str);
if (psrs->str_lens + len + 1 > sizeof(*psrs)) {
if (psrs->strings_off + psrs->str_lens + len + 1 > sizeof(*psrs)) {
str = "?";
len = 1;
if (psrs->str_lens + 2 > sizeof(*psrs))
Expand Down

0 comments on commit 1662b45

Please sign in to comment.