Commit a9a21f73 authored by Thibault Martin's avatar Thibault Martin
Browse files

Remove files with make clean

parent 804646b3
Pipeline #33140 failed with stage
in 19 seconds
directory file line function property kind status property
. cwe787.c 26 copy_input mem_access Unknown \valid(dst_buf + tmp_5)
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 2 (out of 2)
Semantically reached functions = 2
Coverage estimation = 100.0%
[metrics] Statements analyzed by Eva
--------------------------
63 stmts in analyzed functions, 59 stmts analyzed (93.7%)
copy_input: 54 stmts out of 55 (98.2%)
main: 5 stmts out of 8 (62.5%)
cwe787.c:20:[nonterm:stmt] warning: non-terminating loop
stack: copy_input :: cwe787.c:42 <- main
cwe787.c:43:[nonterm:unreachable] warning: unreachable return
cwe787.c:26:[kernel] warning: all target addresses were invalid. This path is assumed to be dead.
stack: copy_input :: cwe787.c:42 <- main
/* Generated by Frama-C */
#include "stdlib.h"
#include "string.h"
#include "strings.h"
char *copy_input(char *user_supplied_string)
{
int i;
int dst_index;
size_t tmp_0;
char *dst_buf =
malloc(((unsigned long)4 * sizeof(char)) * (unsigned long)16);
if (! dst_buf) exit(1);
tmp_0 = strlen((char const *)user_supplied_string);
if ((size_t)16 <= tmp_0) exit(1);
dst_index = 0;
i = 0;
while (1) {
size_t tmp_10;
tmp_10 = strlen((char const *)user_supplied_string);
;
if (! ((size_t)i < tmp_10)) break;
if ('&' == (int)*(user_supplied_string + i)) {
int tmp_1;
int tmp_2;
int tmp_3;
int tmp_4;
int tmp_5;
tmp_1 = dst_index;
dst_index ++;
*(dst_buf + tmp_1) = (char)'&';
tmp_2 = dst_index;
dst_index ++;
*(dst_buf + tmp_2) = (char)'a';
tmp_3 = dst_index;
dst_index ++;
*(dst_buf + tmp_3) = (char)'m';
tmp_4 = dst_index;
dst_index ++;
*(dst_buf + tmp_4) = (char)'p';
tmp_5 = dst_index;
dst_index ++;
*(dst_buf + tmp_5) = (char)';';
}
else
if ('<' == (int)*(user_supplied_string + i)) {
int tmp_6;
int tmp_7;
int tmp_8;
tmp_6 = dst_index;
dst_index ++;
*(dst_buf + tmp_6) = (char)'&';
tmp_7 = dst_index;
dst_index ++;
*(dst_buf + tmp_7) = (char)'l';
tmp_8 = dst_index;
dst_index ++;
*(dst_buf + tmp_8) = (char)'t';
}
else {
int tmp_9;
tmp_9 = dst_index;
dst_index ++;
*(dst_buf + tmp_9) = *(user_supplied_string + i);
}
i ++;
}
return dst_buf;
}
int main(void)
{
int __retres;
char *tmp;
char *tmp_0;
char *benevolent_string = (char *)"<a href=\'ab&c\'>";
tmp = copy_input(benevolent_string);
free((void *)tmp);
char *malicious_string = (char *)"&&&&&&&&&&&&&&&";
tmp_0 = copy_input(malicious_string);
free((void *)tmp_0);
__retres = 0;
return __retres;
}
[metrics] Defined functions (2)
=====================
copy_input (2 calls); main (0 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (1)
==========================
main;
Global metrics
==============
Sloc = 63
Decision point = 5
Global variables = 0
If = 5
Loop = 1
Goto = 0
Assignment = 38
Exit point = 2
Function = 2
Function call = 9
Pointer dereferencing = 12
Cyclomatic complexity = 7
directory file line function property kind status property
. cwe787.c 22 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 22 copy_input mem_access Unknown \valid(dst_buf + tmp_1)
. cwe787.c 23 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 23 copy_input mem_access Unknown \valid(dst_buf + tmp_2)
. cwe787.c 24 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 24 copy_input mem_access Unknown \valid(dst_buf + tmp_3)
. cwe787.c 25 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 25 copy_input mem_access Unknown \valid(dst_buf + tmp_4)
. cwe787.c 26 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 26 copy_input mem_access Unknown \valid(dst_buf + tmp_5)
. cwe787.c 29 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 29 copy_input mem_access Unknown \valid(dst_buf + tmp_6)
. cwe787.c 30 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 30 copy_input mem_access Unknown \valid(dst_buf + tmp_7)
. cwe787.c 31 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 31 copy_input mem_access Unknown \valid(dst_buf + tmp_8)
. cwe787.c 33 copy_input signed_overflow Unknown dst_index + 1 ≤ 2147483647
. cwe787.c 33 copy_input mem_access Unknown \valid(dst_buf + tmp_9)
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 2 (out of 2)
Semantically reached functions = 2
Coverage estimation = 100.0%
[metrics] Statements analyzed by Eva
--------------------------
63 stmts in analyzed functions, 62 stmts analyzed (98.4%)
main: 8 stmts out of 8 (100.0%)
copy_input: 54 stmts out of 55 (98.2%)
/* Generated by Frama-C */
#include "stdlib.h"
#include "string.h"
#include "strings.h"
char *copy_input(char *user_supplied_string)
{
int i;
int dst_index;
size_t tmp_0;
char *dst_buf =
malloc(((unsigned long)4 * sizeof(char)) * (unsigned long)16);
if (! dst_buf) exit(1);
tmp_0 = strlen((char const *)user_supplied_string);
if ((size_t)16 <= tmp_0) exit(1);
dst_index = 0;
i = 0;
while (1) {
size_t tmp_10;
tmp_10 = strlen((char const *)user_supplied_string);
;
if (! ((size_t)i < tmp_10)) break;
if ('&' == (int)*(user_supplied_string + i)) {
int tmp_1;
int tmp_2;
int tmp_3;
int tmp_4;
int tmp_5;
tmp_1 = dst_index;
dst_index ++;
*(dst_buf + tmp_1) = (char)'&';
tmp_2 = dst_index;
dst_index ++;
*(dst_buf + tmp_2) = (char)'a';
tmp_3 = dst_index;
dst_index ++;
*(dst_buf + tmp_3) = (char)'m';
tmp_4 = dst_index;
dst_index ++;
*(dst_buf + tmp_4) = (char)'p';
tmp_5 = dst_index;
dst_index ++;
*(dst_buf + tmp_5) = (char)';';
}
else
if ('<' == (int)*(user_supplied_string + i)) {
int tmp_6;
int tmp_7;
int tmp_8;
tmp_6 = dst_index;
dst_index ++;
*(dst_buf + tmp_6) = (char)'&';
tmp_7 = dst_index;
dst_index ++;
*(dst_buf + tmp_7) = (char)'l';
tmp_8 = dst_index;
dst_index ++;
*(dst_buf + tmp_8) = (char)'t';
}
else {
int tmp_9;
tmp_9 = dst_index;
dst_index ++;
*(dst_buf + tmp_9) = *(user_supplied_string + i);
}
i ++;
}
return dst_buf;
}
int main(void)
{
int __retres;
char *tmp;
char *tmp_0;
char *benevolent_string = (char *)"<a href=\'ab&c\'>";
tmp = copy_input(benevolent_string);
free((void *)tmp);
char *malicious_string = (char *)"&&&&&&&&&&&&&&&";
tmp_0 = copy_input(malicious_string);
free((void *)tmp_0);
__retres = 0;
return __retres;
}
[metrics] Defined functions (2)
=====================
copy_input (2 calls); main (0 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (1)
==========================
main;
Global metrics
==============
Sloc = 63
Decision point = 5
Global variables = 0
If = 5
Loop = 1
Goto = 0
Assignment = 38
Exit point = 2
Function = 2
Function call = 9
Pointer dereferencing = 12
Cyclomatic complexity = 7
directory file line function property kind status property
. besson_blazy_wilke_6_2.c 3 main ptr_comparison Unknown \pointer_comparable(p, (void *)((int)(-1)))
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 1 (out of 1)
Semantically reached functions = 1
Coverage estimation = 100.0%
[metrics] Statements analyzed by Eva
--------------------------
4 stmts in analyzed functions, 4 stmts analyzed (100.0%)
main: 4 stmts out of 4 (100.0%)
/* Generated by Frama-C */
#include "assert.h"
#include "errno.h"
#include "inttypes.h"
#include "stdarg.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "strings.h"
int main(void)
{
int __retres;
void *p = malloc(sizeof(int));
_Bool b = (_Bool)(p == (void *)(-1));
__retres = 0;
return __retres;
}
[metrics] Defined functions (1)
=====================
main (0 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (1)
==========================
main;
Global metrics
==============
Sloc = 4
Decision point = 0
Global variables = 0
If = 0
Loop = 0
Goto = 0
Assignment = 3
Exit point = 1
Function = 1
Function call = 1
Pointer dereferencing = 0
Cyclomatic complexity = 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment