fuzzyc2cpg icon indicating copy to clipboard operation
fuzzyc2cpg copied to clipboard

Escape characters in function names

Open itsacoderepo opened this issue 5 years ago • 5 comments

Description

The CPG contains function names with escape sequences, eg. CHAT_PROTOCOL(server)->\\n\\t\\t\\tquery_create. It seems to be a parsing error of:

		query = CHAT_PROTOCOL(server)->
			query_create(server->tag, nick, TRUE);

See: https://github.com/irssi/irssi/blob/master/src/fe-common/core/fe-queries.c#L53-L54

Reproduction steps

  1. CPG creation:
$ git clone https://github.com/irssi/irssi
$ ./fuzzyc2cpg.sh irssi/src/ --out irssi.bin.zip 
  1. Load the CPG and search the function
ocular> loadCpg("irssi.bin.zip") 
ocular> cpg.method.fullName("CHAT.*query_create.*").fullName.p 
res5: List[String] = List("CHAT_PROTOCOL(server)->\\n\\t\\t\\tquery_create")

itsacoderepo avatar Jan 23 '19 17:01 itsacoderepo