mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
weather: removed constraints of 3 locations per uri from docs; corrected possible buffer overflow
This commit is contained in:
parent
e1011c0d13
commit
6793959916
@ -3288,10 +3288,13 @@
|
||||
<option>URI icao data_type (delay_in_minutes)</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Download, parse and display METAR data from the
|
||||
NWS. icao must be a valid icao for the required
|
||||
location (see for instance
|
||||
https://pilotweb.nas.faa.gov/qryhtml/icao/). For the URI, you can use any METAR source, but a good example is http://weather.noaa.gov/pub/data/observations/metar/stations/ (from the US NOAA).</para>
|
||||
<para>Download, parse and display METAR data.</para>
|
||||
<para>For the URI, you can use any METAR source, but
|
||||
a good example is
|
||||
http://weather.noaa.gov/pub/data/observations/metar/stations/
|
||||
(from the US NOAA).</para>
|
||||
icao must be a valid icao for the required location
|
||||
(see for instance https://pilotweb.nas.faa.gov/qryhtml/icao/).
|
||||
<para>'data_type' must be one of the following:</para>
|
||||
<simplelist>
|
||||
<member>
|
||||
@ -3336,9 +3339,8 @@
|
||||
</member>
|
||||
</simplelist>
|
||||
<para>delay_in_minutes (optional, default 30) cannot be
|
||||
lower than 30 min. Up to 3 stations can be
|
||||
simultaneously queried. Note that this feature is still
|
||||
EXPERIMENTAL.</para>
|
||||
lower than 30 min.</para>
|
||||
<para>Note that this feature is still EXPERIMENTAL.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -2820,7 +2820,7 @@ static struct text_object *construct_text_object(const char *s,
|
||||
char *data_type = (char *) malloc(32 * sizeof(char));
|
||||
char *tmp_p;
|
||||
|
||||
argc = sscanf(arg, "%127s %4s %31s %d", uri, icao, data_type, &interval);
|
||||
argc = sscanf(arg, "%119s %4s %31s %d", uri, icao, data_type, &interval);
|
||||
|
||||
//icao MUST BE upper-case
|
||||
tmp_p = icao;
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <curl/types.h>
|
||||
#include <curl/easy.h>
|
||||
|
||||
#define MAX_LOCATIONS 3
|
||||
|
||||
/* Possible sky conditions */
|
||||
#define NUM_CC_CODES 6
|
||||
const char *CC_CODES[NUM_CC_CODES] = {
|
||||
|
Loading…
Reference in New Issue
Block a user