[Soot-list] regarding FlowDroid - finding paths- to Toast.show()
H S
aras_h1988 at yahoo.com
Wed May 28 20:59:38 EDT 2014
Hi all:
I should find paths by running flowDroid on my code.
I have Toast in my code, the flowDroid can detect it as an sink, where I
gave its signature before.
But it is unable now to detect the path from source to sink.
here is the code which contains the toast which is as an sink.
//in openAlert(v)
alertDialogBuilder.setNegativeButton("No",new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
// cancel the alert box and put a Toast to the user
dialog.cancel();
Toast.makeText(getApplicationContext(), "You chose a negative answer", Toast.LENGTH_LONG).show();
}
});
and here is the source :
String Number = editText.getText().toString();//source
NumberInt = Integer.parseInt(Number);
if (NumberInt<50){
openAlert(v);
}
The probable scenario: The user gives a number in field number(source), if
it is smaller than- say 50-, then an Alert-Dialog pops up, if he clicks on
No in the Alert-Dialog, the toast will appear.
But now I cannot catch this path.
*However I can catch a path from text field to this below Toast.show() which is considered as an sink.
Here is the code:
if (NumberInt<50){
openAlert(v);
}
else{
Toast.makeText(getApplicationContext(), "Number is not less than 50 to show the dialog",Toast.LENGTH_LONG).show();
// Log.i("INFO", "getNumber " + NumberInt);
}
Any suggestion would be appreciated.
Sarah
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140528/6ed7de85/attachment-0003.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app14.apk_results.xml
Type: text/xml
Size: 36612 bytes
Desc: not available
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140528/6ed7de85/attachment-0003.xml
More information about the Soot-list
mailing list