---
src/pacman/util.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/pacman/util.c b/src/pacman/util.c
index dd6e218..3d71d8b 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1449,11 +1449,14 @@ int multiselect_question(char *array, int count)
* free memory
* close open file
Signed-off-by: Rikard Falkeborn
---
src/util/pacsort.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
index 3337d97..e7dc63e 100644
--- a/src/util/pacsort.c
+++ b/src/util/pacsort.c
Since it can fail, check the return value.
If it fails, we need to free the memory of the object we wanted
to add to the list.
Signed-off-by: Rikard Falkeborn
---
src/util/pacsort.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
That makes it impossible to free it later.
Signed-off-by: Rikard Falkeborn
---
src/util/pacsort.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
index 003ec07..3337d97 100644
--- a/src/util/pacsort.c
+++ b/src/util
If CALLOC fails, conflict is NULL, so we shouldn't
attempt to free it's members, since that would
lead to a NULL pointer dereference.
Signed-off-by: Rikard Falkeborn
---
Is there a reason none of the alpm_*_free() functions check if the input
is NULL? That would be more robust, and wh
Also, use FREE() instead of free() in _alpm_backup_free()
to set the pointers to NULL.
Signed-off-by: Rikard Falkeborn
---
lib/libalpm/backup.c | 7 ---
lib/libalpm/conflict.c | 2 ++
lib/libalpm/db.c | 1 +
lib/libalpm/delta.c| 1 +
lib/libalpm/deps.c | 2 ++
lib/libalpm
2015-10-24 21:51 GMT+02:00 Rikard Falkeborn :
> If CALLOC fails, conflict is NULL, so we shouldn't
> attempt to free it's members, since that would
> lead to a NULL pointer dereference.
>
> Signed-off-by: Rikard Falkeborn
> ---
> Is there a reason none of the alpm_
outside of title_suffix.
Signed-off-by: Rikard Falkeborn
---
src/pacman/package.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/pacman/package.c b/src/pacman/package.c
index dbd23f5..59f4327 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -79,6
Den 1 nov 2015 09:36 skrev "Pierre Neidhardt" :
>
> There is a much simpler fix:
>
> > - static const wchar_t *title_suffix = L" :";
> > - static const wchar_t title_suffix[] = L" :";
>
> I'll commit the patch right row.
>
> --
> Pierre Neidhardt
>
> To communicate is the beginning of under
Den 1 nov 2015 09:55 skrev "Rikard Falkeborn" :
>
>
> Den 1 nov 2015 09:36 skrev "Pierre Neidhardt" :
> >
> > There is a much simpler fix:
> >
> > > - static const wchar_t *title_suffix = L" :";
> > > - static co
Den 2 nov 2015 08:47 skrev "Pierre Neidhardt" :
>
> Since you caught the issue, Rikard, do you want to do send the patch?
>
> --
> Pierre Neidhardt
Was there a problem with the original patch I sent? If it needs changes or
be resubmitted, I wont be able to do it within a couple of days so feel
fre
---
lib/libalpm/be_sync.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index b09b060..9229622 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -178,6 +178,7 @@ int SYMEXPORT alpm_db_update(int force, a
---
lib/libalpm/diskspace.c | 2 +-
lib/libalpm/dload.c | 2 +-
lib/libalpm/remove.c| 2 +-
lib/libalpm/util.c | 2 +-
src/pacman/callback.c | 12 ++--
src/pacman/conf.c | 4 ++--
src/pacman/util.c | 4 ++--
7 files changed, 14 insertions(+), 14 deletions(-
due to integer
promotion rules.
Fixes failing test/pacman/tests/sync012.py when compiling with -funsigned-char.
Fixes two warnings [-Wtype-limits] for comparissons with -1 when compiling
with -funsigned-char.
Signed-off-by: Rikard Falkeborn
---
lib/libalpm/graph.h | 2 +-
1 file changed, 1
Signed-off-by: Rikard Falkeborn
---
test/util/pacsorttest.sh | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/test/util/pacsorttest.sh b/test/util/pacsorttest.sh
index 3b285b8..32ee6ba 100755
--- a/test/util/pacsorttest.sh
+++ b/test/util/pacsorttest.sh
value check works for both unsigned and signed char.
Fixes one warning [-Wtype-limits] for comparissons with -1 when compiling
with -funsigned-char.
Signed-off-by: Rikard Falkeborn
---
src/util/pacsort.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/util
something).
After doing this, I realize that the simplest solution probably would be to
add -fsigned-char as an argument to the compiler... thoughts?
Rikard Falkeborn (3):
Make alpm_graph state signedness explicit
pacsort, introduce define for escape_char error code
Add pacsort tests with invalid
There are some warnings recently introduced when compiling with Clang (with
--enable-warningflags) for x86_64. The warnings are related to casting of
specific alpm_event-types to alpm_event_t where the required alignment
differs between the types. On x86, it shouldn't be a problem, but maybe
there
Den 1 jan 2016 15:06 skrev "Olivier Brunel" :
>
> On Fri, 1 Jan 2016 23:03:22 +1000
> Allan McRae wrote:
>
> > On 01/01/16 22:01, Olivier Brunel wrote:
> > > On Thu, 31 Dec 2015 14:32:45 +0100
> > > Rikard Falkeborn wrote:
> > >
> >
2016-01-02 19:21 GMT+01:00 Olivier Brunel :
> As reported by Rikard Falkeborn[1] using event-specific struct and then
> typecasting to the generic alpm_event_t could possibly lead to alignment
> issue,
> so we now always use alpm_event_t instead.
>
> [1]
> https://lists.ar
2016-06-09 23:16 GMT+02:00 Tobias Stoeckmann :
> ...
> You can trigger it by running this command:
>
> $ echo -e "-.pkg.tar.xz\n-.pkg.tar.xz" | pacsort -k 99 -t '\0'
> Segmentation fault
>
> ...
> $ echo "-/.pkg.tar.xz" | pacsort
> Segmentation fault
>
>
Could these two cases be added to pac
does not occur
when simplifying conditional
[-Werror=strict-overflow]
if(count > 0) {
Fix this by changing the type of count from int to size_t, which is
fine since count is never negative.
Signed-off-by: Rikard Falkeborn
---
Making it size_t matches the return value of alpm_list_count() and
avoids the implicit cast to int.
Signed-off-by: Rikard Falkeborn
---
lib/libalpm/be_sync.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index f127ed8
Since the number of packages is not used anywhere, just return a
boolean to avoid the implicit cast from size_t to int in be_local.c.
Use 0 as success to be consistent with db_validate.
Signed-off-by: Rikard Falkeborn
---
This patch is made on top of the "Fix Gcc overflow patch". It
2016-10-08 7:18 GMT+02:00 Alad Wenter :
> Signed-off-by: Alad Wenter
> ---
> v2: Add missing signoff.
>
> scripts/libmakepkg/util/option.sh | 157 ++
>
> scripts/library/README| 20 -
> scripts/library/parseopts.sh | 137 ---
2016-10-04 10:21 GMT+02:00 Christian Hesse :
> From: Christian Hesse
>
> We checked for empty array elements, but did not catch empty array. Add
> a check for that case as well.
>
> Signed-off-by: Christian Hesse
> ---
> scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in | 5 +
> 1 file changed
>> Why not move it to util/parseopts.sh if it should be moved into
libmakepkg?
>>
> I suppose that makes sense. util/util.sh ("General utility functions")
may also be appropriate if we don't want to create a new file.
Why do you want to move it to libmakepkg? Isn't library a more suitable
place? F
:/usr/lib/libdl-2.24.so
fun:dlsym
obj:/usr/lib/libfakeroot/fakechroot/libfakechroot.so
fun:bindtextdomain
obj:/usr/lib/libgpg-error.so.0.20.0
fun:call_init.part.0
fun:_dl_init
obj:/usr/lib/ld-2.24.so
obj:*
obj:*
obj:*
}
Signed-off-by: Rikard Falkeborn
In order to detect if pkgver contains whitespace, we need to quote it.
Previously, only the characters up to the first whitespace was checked.
Signed-off-by: Rikard Falkeborn
---
scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
Signed-off-by: Rikard Falkeborn
---
doc/PKGBUILD.5.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 3b8c2ed1..cbd02e88 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -48,7 +48,8 @@ similar to `$_basekernver
Make the documentation a little more explicit about allowed characters
for arch and pkgver. Also fix linting of pkgver which was broken if
pkgver contained whitespace.
Rikard Falkeborn (3):
PKGBUILD.5: Mention valid characters for arch
PKGBUILD.5: Mention that pkgver can't contain white
Signed-off-by: Rikard Falkeborn
---
doc/PKGBUILD.5.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 18bc2a19..3b8c2ed1 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -168,7 +168,8 @@ contain whitespace characters
Signed-off-by: Rikard Falkeborn
---
doc/pacman.conf.5.asciidoc | 2 +-
doc/submitting-patches.asciidoc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/pacman.conf.5.asciidoc b/doc/pacman.conf.5.asciidoc
index 5f9def5b..9810fc7f 100644
--- a/doc/pacman.conf.5
Clang 8 warns that adding a string to an integer does not append to
string. Indeed it doesn't, but that was not the intentetion. Use array
indexing as suggested by the compiler to silence the warning. There
should be no functional change.
Example of warning message:
alpm.c:71:54: warning: add
be_package and
be_sync, this fixes hypothetical memory leaks (and thereafter null
pointer dereferences) in case realloc fails to shrink the allocated
memory.
Signed-off-by: Rikard Falkeborn
---
lib/libalpm/be_local.c | 7 +--
lib/libalpm/be_package.c | 3 +--
lib/libalpm/be_sync.c| 2
Signed-off-by: Rikard Falkeborn
---
lib/libalpm/diskspace.c | 2 +-
lib/libalpm/diskspace.h | 2 +-
lib/libalpm/util.c | 2 +-
src/pacman/util.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index 4cc17a12
36 matches
Mail list logo