Merge "adb: fix undefined behavior"