[request-sponsor] Fix ready for Bug ID 6355611

2008-01-08 Thread Souvik Das Gupta
Hello

Here is the 'diff -u' output of the fix:


--- fmt.c.orig  Fri Jan  4 01:43:17 2008
+++ fmt.c   Sat Jan  5 12:20:48 2008
@@ -53,6 +53,7 @@
 wchar_toutbuf[BUFSIZ]; /* Sandbagged output line image 
*/
 wchar_t*outp;  /* Pointer in above */
 intfiller; /* Filler amount in outbuf */
+char sobuf[BUFSIZ];/* Global buffer - Correction to Bug 
6355611 */
 
 intpfx;/* Current leading blank count */
 intwidth = 72; /* Width that we will not exceed */
@@ -115,7 +116,6 @@
 main(int argc, char **argv)
 {
FILE *fi;
-   char sobuf[BUFSIZ];
char *cp;
int nofile;
char *locale;

 
I have tested the compiled fmt command for giving out a formatted output of a 
text file. It works perfectly fine.

Regards
Souvik Das Gupta
 
 
This message posted from opensolaris.org



[request-sponsor] Fix ready for Bug ID 6355611

2008-01-07 Thread Souvik Das Gupta
Hello

I have the fix ready for the following bug:

Bug ID: 6355611
Synopsis: setbuf misuse
Description: A subtle bug exists in fmt.c (using the source cross referencer 
the bug is visible else where). main() calls setbug passing a buffer that 
exists in main's stack. It can occur that the data in the buffer is not used 
until exit causes the buffer to be flushed, however the buffer is technically 
out-of-scope and should not be used.
Category: utility   Sub-Category: formatter

I would request someone to sponsor this bug.

I have have already submitted my Sun Contributor Agreement, but I am still 
awaiting my SCA number.

Regards
Souvik Das Gupta
 
 
This message posted from opensolaris.org