~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools-precise.sid-merge1

« back to all changes in this revision

Viewing changes to lib/misc/posixPosix.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-12-06 07:45:05 UTC
  • mfrom: (1.1.8 upstream) (2.4.10 sid)
  • Revision ID: james.westby@ubuntu.com-20091206074505-43rp7oejjgp0y2re
Tags: 2009.11.16-210370-1
* Merging upstream version 2009.11.16-210370.
* Moving vmusr plugins from open-vm-tools to open-vm-toolbox (Closes:
  #539282, #557215).
* Correcting plugin location (Closes: #545222, #549044).
* Dropping la files (Closes: #551626).
* Adding open-vm-toolbox lintian overrides.
* Removing test plugin.
* Removing unused plugin symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
934
934
   if (argv) {
935
935
      errno = 0;
936
936
      if (count > 0) {
937
 
         PosixConvertToCurrent(arg0, &argv[0]);
 
937
         if (!PosixConvertToCurrent(arg0, &argv[0])) {
 
938
            goto exit;
 
939
         }
938
940
         va_start(vl, arg0);
939
941
         for (i = 1; i < count; i++) {
940
 
            PosixConvertToCurrent(va_arg(vl, char *), &argv[i]);
 
942
            if (!PosixConvertToCurrent(va_arg(vl, char *), &argv[i])) {
 
943
               goto exit;
 
944
            }
941
945
         }
942
946
         va_end(vl);
943
947
      }
944
948
      argv[count] = NULL;
945
949
      if (errno != 0) {
946
 
         goto exit;
 
950
         goto exit;
947
951
      }
948
952
   }
949
953
 
951
955
 
952
956
exit:
953
957
   if (argv) {
954
 
      Util_FreeStringList(argv, count + 1);
 
958
      Util_FreeStringList(argv, -1);
955
959
   }
956
960
   free(path);
957
961
   return ret;
1006
1010
   if (argv) {
1007
1011
      errno = 0;
1008
1012
      if (count > 0) {
1009
 
         PosixConvertToCurrent(arg0, &argv[0]);
 
1013
         if (!PosixConvertToCurrent(arg0, &argv[0])) {
 
1014
            goto exit;
 
1015
         }
1010
1016
         va_start(vl, arg0);
1011
1017
         for (i = 1; i < count; i++) {
1012
 
            PosixConvertToCurrent(va_arg(vl, char *), &argv[i]);
 
1018
            if (!PosixConvertToCurrent(va_arg(vl, char *), &argv[i])) {
 
1019
               goto exit;
 
1020
            }
1013
1021
         }
1014
1022
         va_end(vl);
1015
1023
      }
1016
1024
      argv[count] = NULL;
1017
1025
      if (errno != 0) {
1018
 
         goto exit;
 
1026
         goto exit;
1019
1027
      }
1020
1028
   }
1021
1029
 
1023
1031
 
1024
1032
exit:
1025
1033
   if (argv) {
1026
 
      Util_FreeStringList(argv, count + 1);
 
1034
      Util_FreeStringList(argv, -1);
1027
1035
   }
1028
1036
   free(file);
1029
1037
   return ret;