Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-ppp: Commit

external/ppp


Commit MetaInfo

Révisionfc562d204c7e5acd6c839f19fa2b3a126df9b351 (tree)
l'heure2012-11-16 15:21:09
AuteurBen Cheng <bccheng@andr...>
CommiterGerrit Code Review

Message de Log

Merge "Get rid of strlcat / strlcpy"

Change Summary

Modification

--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -506,8 +506,10 @@ void print_string __P((char *, int, void (*) (void *, char *, ...),
506506 void *)); /* Format a string for output */
507507 int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
508508 int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
509+#if !defined(ANDROID_CHANGES)
509510 size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */
510511 size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */
512+#endif
511513 void dbglog __P((char *, ...)); /* log a debug message */
512514 void info __P((char *, ...)); /* log an informational message */
513515 void notice __P((char *, ...)); /* log a notice-level message */
--- a/pppd/utils.c
+++ b/pppd/utils.c
@@ -81,6 +81,8 @@ struct buffer_info {
8181 int len;
8282 };
8383
84+#if !defined(ANDROID_CHANGES)
85+
8486 /*
8587 * strlcpy - like strcpy/strncpy, doesn't overflow destination buffer,
8688 * always leaves destination null-terminated (for len > 0).
@@ -118,6 +120,7 @@ strlcat(dest, src, len)
118120
119121 return dlen + strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0));
120122 }
123+#endif
121124
122125
123126 /*
Afficher sur ancien navigateur de dépôt.