🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #182

gawk: printf() running off end of array

#182
From: mycroft
Date: Sat, 01 Aug 1992 05:38
28 lines
1158 bytes
Fri Jul 31 22:42:37 1992  Charles Hannum  (mycroft@hal.gnu.ai.mit.edu)

	* builtin.c (do_sprintf): Leave space in obuf for null added by
	make_str_node.

*** builtin.c.orig	Wed Jun 19 08:30:27 1991
--- builtin.c	Fri Jul 31 22:35:10 1992
***************
*** 567,575 ****
  	}
  	if (carg != NULL)
  		warning("too many arguments supplied for format string");
! 	bchunk(s0, s1 - s0);
  	free_temp(sfmt);
! 	r = make_str_node(obuf, olen, ALREADY_MALLOCED);
  	r->flags |= TEMP;
  	return r;
  }
--- 567,575 ----
  	}
  	if (carg != NULL)
  		warning("too many arguments supplied for format string");
! 	bchunk(s0, s1 - s0 + 1);
  	free_temp(sfmt);
! 	r = make_str_node(obuf, olen - 1, ALREADY_MALLOCED);
  	r->flags |= TEMP;
  	return r;
  }
Technical Details
Message-ID: <9208010538.AA58052@hal.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mycroft

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mycroft
From: mycroft@gnu.ai.mit.edu
Subject: gawk: printf() running off end of array
Message-ID: <9208010538.AA58052@hal.gnu.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 1 Aug 1992 05:38:14 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 30