]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common source file not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 4 Nov 2022 18:45:05 +0000 (11:45 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 4 Nov 2022 18:45:05 +0000 (11:45 -0700)
open-vm-tools/lib/misc/codesetOld.c

index 00d55a2d13cb494510599b3dda75959fc5f16951..4086959aa7c048641d4751ca18027c351894f475 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017,2019,2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017,2019,2021,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -82,22 +82,14 @@ static Bool CodeSetOldIso88591ToUtf8Db(char const *bufIn, size_t sizeIn,
 #endif
 
 #if defined __ANDROID__
-#include "vm_basic_asm.h"
 /*
- * Android doesn't have swab().
+ * This function will be called when buffer overflows. It will panic the app.
+ * It should be in libc.a. But new Android ndk does not have it.
  */
-void
-swab(const void *__restrict src,  // IN/OUT
-     void *__restrict dest,       // IN/OUT
-     ssize_t nbytes)              // IN
+void __stack_chk_fail(void);
+void __stack_chk_fail_local (void)
 {
-   const uint16 *p = src;
-   uint16 *q = dest;
-   ssize_t i;
-
-   for (i = 0; i < nbytes / sizeof *p; i++) {
-      q[i] = Bswap16(p[i]);
-   }
+   __stack_chk_fail();
 }
 #endif