1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-22 17:22:18 -05:00

use 1024 for buffer size, otherwise it crashes (why?)

This commit is contained in:
berkeviktor@aol.com 2011-01-12 19:00:59 +01:00
parent a747cf62be
commit 669a6a66cb
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* XChat-WDK /* XChat-WDK
* Copyright (c) 2010 Berke Viktor. * Copyright (c) 2010-2011 Berke Viktor.
* *
* Use of OpenSSL SHA256 interface: http://adamlamers.com/?p=5 * Use of OpenSSL SHA256 interface: http://adamlamers.com/?p=5
* *
@ -120,7 +120,7 @@ init ()
/* check whether the config file exists, if it doesn't, try to create it */ /* check whether the config file exists, if it doesn't, try to create it */
FILE * file_in; FILE * file_in;
FILE * file_out; FILE * file_out;
char buffer[512]; char buffer[1024];
config_fail = 0; config_fail = 0;
snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs")); snprintf (buffer, sizeof (buffer), "%s/checksum.conf", xchat_get_info (ph, "xchatdirfs"));
@ -144,7 +144,7 @@ static unsigned long long
get_max_hash_size () get_max_hash_size ()
{ {
FILE * file_in; FILE * file_in;
char buffer[512]; char buffer[1024];
unsigned long long max_hash_size; unsigned long long max_hash_size;
if (config_fail) if (config_fail)
@ -193,7 +193,7 @@ increase_max_hash_size ()
{ {
unsigned long long size; unsigned long long size;
FILE * file_out; FILE * file_out;
char buffer[512]; char buffer[1024];
if (config_fail) if (config_fail)
{ {
@ -220,7 +220,7 @@ decrease_max_hash_size ()
{ {
unsigned long long size; unsigned long long size;
FILE * file_out; FILE * file_out;
char buffer[512]; char buffer[1024];
if (config_fail) if (config_fail)
{ {

View File

@ -1,5 +1,5 @@
/* XChat-WDK /* XChat-WDK
* Copyright (c) 2010 Berke Viktor. * Copyright (c) 2010-2011 Berke Viktor.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -91,7 +91,7 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
*plugin_name = "Update Checker"; *plugin_name = "Update Checker";
*plugin_desc = "Plugin for checking for XChat-WDK updates"; *plugin_desc = "Plugin for checking for XChat-WDK updates";
*plugin_version = "1.1"; *plugin_version = "1.2";
xchat_hook_command (ph, "UPDCHK", XCHAT_PRI_NORM, print_version, 0, 0); xchat_hook_command (ph, "UPDCHK", XCHAT_PRI_NORM, print_version, 0, 0);
xchat_command (ph, "MENU -ietc\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\""); xchat_command (ph, "MENU -ietc\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");