SecUSo / privacy-friendly-netmonitor

Privacy Friendly App that shows active network connections of installed apps.
GNU General Public License v3.0
157 stars 33 forks source link

UIDs are reported using the wrong data type #44

Closed stevesoltys closed 7 years ago

stevesoltys commented 7 years ago

If the UID in a connection report is greater than Short.MAX_VALUE, the application will crash:

10-10 21:38:03.151  8470  8497 E AndroidRuntime: java.lang.NumberFormatException: Value out of range. Value:"1010121" Radix:10
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at java.lang.Short.parseShort(Short.java:121)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at java.lang.Short.parseShort(Short.java:145)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.Detector.initReport4(Detector.java:189)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.Detector.initReport(Detector.java:154)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.Detector.parseNetOutput(Detector.java:139)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.Detector.getCurrentConnections(Detector.java:123)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.Detector.updateReportMap(Detector.java:84)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService$1.run(PassiveService.java:136)
10-10 21:38:03.151  8470  8497 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
Yonjuni commented 7 years ago

@stevesoltys Thanks for reporting.