~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to lib/string/bsd_vsnprintf.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
704
704
         flags |= GROUPING;
705
705
         thousands_sep = *(localeconv()->thousands_sep);
706
706
         grouping = localeconv()->grouping;
 
707
 
 
708
         /*
 
709
          * Grouping should not begin with 0, but it nevertheless
 
710
          * does (see bug 281072) and makes the formatting code
 
711
          * behave badly, so we fix it up.
 
712
          */
 
713
 
 
714
         if (grouping != NULL && *grouping == '\0') {
 
715
            static char g[] = { CHAR_MAX, '\0' };
 
716
            grouping = g;
 
717
         }
707
718
         goto rflag;
708
719
      case '.':
709
720
         if ((ch = *fmt++) == '*') {
863
874
            if (expt == 9999)
864
875
               expt = INT_MAX;
865
876
         }
 
877
         /* Our dtoa / ldtoa call strdup(), which can fail. PR319844 */
 
878
         if (dtoaresult == NULL) {
 
879
            sbuf.error = TRUE;
 
880
            goto error;
 
881
         }
866
882
         if (signflag)
867
883
            sign = '-';
868
884
         if (expt == INT_MAX) {   /* inf or nan */