| @@ -1870,27 +1870,27 @@ setup_data(pgpv_cursor_t *cursor, pgpv_t | | | @@ -1870,27 +1870,27 @@ setup_data(pgpv_cursor_t *cursor, pgpv_t |
1870 | /* we have a file name in p */ | | 1870 | /* we have a file name in p */ |
1871 | if ((fp = fopen(p, "r")) == NULL) { | | 1871 | if ((fp = fopen(p, "r")) == NULL) { |
1872 | snprintf(cursor->why, sizeof(cursor->why), "No such file '%s'", (const char *)p); | | 1872 | snprintf(cursor->why, sizeof(cursor->why), "No such file '%s'", (const char *)p); |
1873 | return 0; | | 1873 | return 0; |
1874 | } | | 1874 | } |
1875 | if (fgets(buf, (int)sizeof(buf), fp) == NULL) { | | 1875 | if (fgets(buf, (int)sizeof(buf), fp) == NULL) { |
1876 | fclose(fp); | | 1876 | fclose(fp); |
1877 | snprintf(cursor->why, sizeof(cursor->why), "can't read file '%s'", (const char *)p); | | 1877 | snprintf(cursor->why, sizeof(cursor->why), "can't read file '%s'", (const char *)p); |
1878 | return 0; | | 1878 | return 0; |
1879 | } | | 1879 | } |
1880 | if (is_armored(buf, sizeof(buf))) { | | 1880 | if (is_armored(buf, sizeof(buf))) { |
1881 | read_ascii_armor_file(cursor, p); | | 1881 | read_ascii_armor_file(cursor, p); |
1882 | } else { | | 1882 | } else { |
1883 | read_binary_file(pgp, "signature", "%s", p); | | 1883 | read_binary_file(pgp, "signature", "%s", (const char *)p); |
1884 | } | | 1884 | } |
1885 | fclose(fp); | | 1885 | fclose(fp); |
1886 | } else { | | 1886 | } else { |
1887 | if (is_armored(p, (size_t)size)) { | | 1887 | if (is_armored(p, (size_t)size)) { |
1888 | read_ascii_armor_memory(cursor, p, (size_t)size); | | 1888 | read_ascii_armor_memory(cursor, p, (size_t)size); |
1889 | } else { | | 1889 | } else { |
1890 | read_binary_memory(pgp, "signature", p, (size_t)size); | | 1890 | read_binary_memory(pgp, "signature", p, (size_t)size); |
1891 | } | | 1891 | } |
1892 | } | | 1892 | } |
1893 | return 1; | | 1893 | return 1; |
1894 | } | | 1894 | } |
1895 | | | 1895 | |
1896 | /* get the data and size from litdata packet */ | | 1896 | /* get the data and size from litdata packet */ |