Loading services/core/java/com/android/server/pm/SELinuxMMAC.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -331,9 +331,8 @@ public final class SELinuxMMAC { } } try { try { final byte[] buf = new byte[20]; final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH); final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf); if ((buf.length == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { return false; return false; } } } catch (ErrnoException e) { } catch (ErrnoException e) { Loading services/core/java/com/android/server/pm/UserManagerService.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -3023,9 +3023,8 @@ public class UserManagerService extends IUserManager.Stub { */ */ private static int getSerialNumber(File file) throws IOException { private static int getSerialNumber(File file) throws IOException { try { try { final byte[] buf = new byte[256]; final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL); final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf); final String serial = new String(buf); final String serial = new String(buf, 0, len); try { try { return Integer.parseInt(serial); return Integer.parseInt(serial); } catch (NumberFormatException e) { } catch (NumberFormatException e) { Loading Loading
services/core/java/com/android/server/pm/SELinuxMMAC.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -331,9 +331,8 @@ public final class SELinuxMMAC { } } try { try { final byte[] buf = new byte[20]; final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH); final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf); if ((buf.length == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) { return false; return false; } } } catch (ErrnoException e) { } catch (ErrnoException e) { Loading
services/core/java/com/android/server/pm/UserManagerService.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -3023,9 +3023,8 @@ public class UserManagerService extends IUserManager.Stub { */ */ private static int getSerialNumber(File file) throws IOException { private static int getSerialNumber(File file) throws IOException { try { try { final byte[] buf = new byte[256]; final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL); final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf); final String serial = new String(buf); final String serial = new String(buf, 0, len); try { try { return Integer.parseInt(serial); return Integer.parseInt(serial); } catch (NumberFormatException e) { } catch (NumberFormatException e) { Loading