~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to src/libs/zbxsysinfo/openbsd/diskspace.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2007-07-02 09:06:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070702090651-8l6fl3fjw9rh6l2u
Tags: 1:1.4.1-2
Add patch from SVN in order to fix Incorrect processing of character '%'
in user parameters and remote commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
18
**/
19
19
 
20
 
#include "config.h"
21
 
 
22
20
#include "common.h"
 
21
 
23
22
#include "sysinfo.h"
24
23
 
25
24
int     get_fs_size_stat(char *fs, double *total, double *free, double *usage)
212
211
                return SYSINFO_RET_FAIL;
213
212
        }
214
213
 
215
 
        if(get_param(param, 1, fsname, MAX_STRING_LEN) != 0)
 
214
        if(get_param(param, 1, fsname, sizeof(fsname)) != 0)
216
215
        {
217
216
                return SYSINFO_RET_FAIL;
218
217
        }
219
218
        
220
 
        if(get_param(param, 2, mode, MAX_STRING_LEN) != 0)
 
219
        if(get_param(param, 2, mode, sizeof(mode)) != 0)
221
220
        {
222
221
                mode[0] = '\0';
223
222
        }
224
223
        if(mode[0] == '\0')
225
224
        {
226
225
                /* default parameter */
227
 
                sprintf(mode, "total");
 
226
                zbx_snprintf(mode, sizeof(mode), "total");
228
227
        }
229
228
        
230
229
        for(i=0; fl[i].mode!=0; i++)