xbps-create: fix issue #5 from github: initialize setlocale.

This commit is contained in:
Juan RP 2013-04-01 10:49:25 +02:00
parent e4a3342c39
commit 8736ef6c5a
2 changed files with 6 additions and 0 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.23 (???):
* xbps-create(8): initialize setlocale so that utf8 files can be archived.
The locale must be utf8 capable for this to work. Fixes issue #5 from github.
* libxbps: fix a use-after-free in state cb when a binpkg doesn't match its
hash with the hash stored in repo index.

View File

@ -38,6 +38,7 @@
#include <ftw.h>
#include <fcntl.h>
#include <libgen.h>
#include <locale.h>
#include <xbps_api.h>
#include "queue.h"
@ -679,6 +680,8 @@ main(int argc, char **argv)
destdir = argv[optind];
setlocale(LC_ALL, "");
if (pkgver == NULL)
die("pkgver not set!");
else if (desc == NULL)