Re: NNTPC: printf with long strings (nntpcache-1.0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> We're running nntpcache-1.0 under Sunos-4.1.3.  I've noticed that the
> paths in /var/spool/nntpcache/cache.history here are truncated at 47
> characters.  The reason, I suspect, is that the following code modules
> 
> 	article.c
> 	group.c
> 	history.c
> 	nntpcache.c
> 	xpath.c
> 
> contain printf or sprintf statements with string fields longer than
> 127 characters.  At least for Sunos-4.1.x, the printf man page warns:
> `Very wide fields (>128 characters) fail.'
> 
> We've noticed no problems in use, but we may not have exercised the
> cache sufficiently.  Should I rebuild nntpcache with the long string
> field specifications shortened to 127 characters?  If I do, is there a

Ick. I presume you are refering to the heavy usage of the "%.128s" etc
construct. This notice that the field width is *after* the full-stop.
This limits the number of characters sprinted, but doesn't pad.

Can you perhaps try a test program under sunos-4.1.x to see what the
result is?

Cheers,
Julian.

-- 
"Of all tyrannies a tyranny sincerely  exercised for the good of its victims  
 may be the most  oppressive.  It may be better to live under  robber barons  
 than  under  omnipotent  moral busybodies,  The robber baron's  cruelty may  
 sometimes sleep,  his cupidity may at some point be satiated; but those who  
 torment us for own good  will torment us  without end,  for they do so with 
 the approval of their own conscience."    -   C.S. Lewis, _God in the Dock_ 
+---------------------+--------------------+----------------------------------+
|Julian Assange RSO   | PO Box 2031 BARKER | Secret Analytic Guy Union        |
|proff@suburbia.net   | VIC 3122 AUSTRALIA | finger for PGP key hash ID =     |
|proff@gnu.ai.mit.edu | FAX +61-3-98199066 | C7F81C2AA32D7D4E4D360A2ED2098E0D |
+---------------------+--------------------+----------------------------------+


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux