1
0
Fork 0
Commit Graph

7 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 0222b75e85
Rename project from slweb to libweb
It was found out there was another project of the same name around
(https://git.sr.ht/~strahinja/slweb/), also related to website
generation.

In order to avoid confusion, a new name has been chosen for this
project. Surprisingly, libweb was not in use by any distributions
(according to https://repology.org and AUR index), and it should
reflect well the intention behind this project i.e., being a library
to build web-related stuff.
2023-10-11 00:07:13 +02:00
Xavier Del Campo Romero 8c3ba33ced
Move header files to subdirectory
Since slweb is meant as a library, it is advisable to keep public header
files under their own directory in order to avoid name clashing i.e.,

 #include "something.h"

Now becomes:

 #include "slweb/something.h"
2023-07-21 01:28:38 +02:00
Xavier Del Campo Romero 090eccf092
wildcard_cmp.c: Fix out-of-bounds cmp
When the distance between '*' on a wildcard expression was larger than
the string to compare with, this would cause an out-of-bounds read
because `n` was not being limited to the strlen(3) from the input
string.

Example:

- s="c", p="*cc*", casecmp=false

Here, the distance between the first and second '*' is 2 bytes, which is
longer than the input string itself (1 byte, not counting the
terminating null byte '\0').
2023-07-20 23:52:56 +02:00
Xavier Del Campo Romero ea16427345
wildcard_cmp.c: Fix a couple of bugs
wildcard_cmp would otherwise fail with the following use cases:

s = "mymi", p = "*mi*"
s = "mymi", p = "*mi"
2023-07-20 23:52:55 +02:00
Xavier Del Campo Romero d639e5d269
wildcard_cmp.c: Remove leftovers
These statements had no effect since it was always executed when
n == 0.
2023-07-20 23:52:55 +02:00
Xavier Del Campo Romero 35ced95c36
wildcard_cmp: Allow case-insensitive searches
The new search feature will require them.
2023-07-20 23:52:55 +02:00
Xavier Del Campo Romero 0759122e4c
Split wildcard_cmp into its own component
Future commits will make use of this function outside handler.c.
2023-07-20 23:52:55 +02:00