Hi guys, recently I tried to execute joern on this code
static size_t
xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
size_t size;
xmlChar *newbuf;
if ((buf == NULL) || (buf->error != 0)) return(0);
CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (buf->use + len < buf->size)
return(BAD_CAST buf->size - buf->use);
else
return(1);
switch(o){
case TEST_CODE_1:
print("test")
break;
case TEST_CODE_2:
break;
case "5":
print("test")
break;
default:
print("asd")
}
return(buf->size - buf->use);
}
After the parsing I have extrapolated all the lines parsed by joern and i regenerated the code. I have notice that some C words like else (without brackets) and the case have been deleted from the regenerated file
static size_t
xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
if ((buf == NULL) || (buf->error != 0)) return(0);
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (buf->use + len < buf->size)
return(1);
switch(o){
}
return(buf->size - buf->use);
}
Is this a bug?
for the line extraction I used this script
cpg.all.map(_.location.lineNumber).dedup.toJson |> "%s/lines_%s.dump".format(path, suffix)
I am not able to run joern --server. I am using the latest Joern. All the time it shows the following error:
Unrecognized option: --server
usage: joern [SOURCE_DIR1] ...
-outdir <outdir> specifies where the neo4j database will be written
Can anyone please help me? Is this channel deprecated?